Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/content/docs/usecontroller/controller.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The following table contains information about the arguments for `Controller`.
| `shouldUnregister` | <TypeText>boolean = false`</TypeText> | | Input will be unregistered after unmount and defaultValues will be removed as well.<br/><br/>**Note:** this prop should be avoided when using with `useFieldArray` as `unregister` function gets called after input unmount/remount and reorder. |
| `disabled` | <TypeText>boolean = false`</TypeText> | | `disabled` prop will be returned from `field` prop. Controlled input will be disabled and its value will be omitted from the submission data. |
| `defaultValue` | <TypeText>unknown</TypeText> | | **Important:** Can not apply `undefined` to `defaultValue` or `defaultValues` at `useForm`. <ul><li>You need to either set `defaultValue` at the field-level or `useForm`'s `defaultValues`. If you used <code>defaultValues</code> at <code>useForm</code>, skip using this prop.</li><li>If your form will invoke `reset` with default values, you will need to provide `useForm` with `defaultValues`.</li><li>Calling `onChange` with `undefined` is not valid. You should use `null` or the empty string as your default/cleared value instead.</li></ul> |
| `exact` | <TypeText>boolean = false</TypeText> | | This prop will enable an exact match for input name subscriptions, default to true. |

### Return

Expand Down
14 changes: 14 additions & 0 deletions src/data/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2843,6 +2843,20 @@ setValue('notRegisteredInput', { test: '1', test2: '2' }); // ✅ sugar syntax t
</ul>
</td>
</tr>
<tr>
<td>
<code>exact</code>
</td>
<td>
<code className={typographyStyles.typeText}>boolean = false</code>
</td>
<td></td>
<td>
<p>
This prop will enable an exact match for input name subscriptions, default to true.
</p>
</td>
</tr>
</tbody>
),
tips: (
Expand Down