Skip to content

Commit 7166890

Browse files
committed
close #1023 disable return prop
1 parent c16a084 commit 7166890

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/components/UseControllerMethods.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ const UseControllerMethods = ({
102102
<p>The current value of the controlled component.</p>
103103
</td>
104104
</tr>
105+
<tr>
106+
<td>
107+
<code>field</code>
108+
</td>
109+
<td>
110+
<code>disabled</code>
111+
</td>
112+
<td>
113+
<code className={typographyStyles.typeText}>boolean</code>
114+
</td>
115+
<td>
116+
<p>The disabled state of the input.</p>
117+
</td>
118+
</tr>
105119
<tr>
106120
<td>
107121
<code>field</code>

src/content/docs/usecontroller/controller.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The following table contains information about properties which `Controller` pro
3535
| `field` | `onChange` | <TypeText>`(value: any) => void`</TypeText> | A function which sends the input's value to the library.<br/><br/>_ It should be assigned to the `onChange` prop of the input and value should **not be `undefined`**.<br/>_ This prop update [formState](/docs/useform/formstate) and you should avoid manually invoke [setValue](/docs/useform/setvalue) or other API related to field update. |
3636
| `field` | `onBlur` | <TypeText>`() => void`</TypeText> | A function which sends the input's onBlur event to the library. It should be assigned to the input's `onBlur` prop. |
3737
| `field` | `value` | <TypeText>unknown</TypeText> | The current value of the controlled component. |
38+
| `field` | `disabled` | <TypeText>boolean</TypeText> | The disabled state of the input. |
3839
| `field` | `name` | <TypeText>string</TypeText> | Input's name being registered. |
3940
| `field` | `ref` | <TypeText>React.ref</TypeText> | A ref used to connect hook form to the input. Assign `ref` to component's input ref to allow hook form to focus the error input. |
4041
| `fieldState` | `invalid` | <TypeText>boolean</TypeText> | Invalid state for current input. |

0 commit comments

Comments
 (0)