Skip to content

Commit e8a847c

Browse files
fix: update validatingFields type from boolean to object in documentation (#1142)
1 parent 608d8c1 commit e8a847c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/FormStateApi.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const FormStateApi = ({
183183
<code>validatingFields</code>
184184
</td>
185185
<td>
186-
<code className={typographyStyles.typeText}>boolean</code>
186+
<code className={typographyStyles.typeText}>object</code>
187187
</td>
188188
<td>{(api || API).formState.validatingFields}</td>
189189
</tr>

src/content/docs/useform/formstate.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This object contains information about the entire form state. It helps you to ke
3030
| `submitCount` | <TypeText>number</TypeText> | Number of times the form was submitted. |
3131
| `isValid` | <TypeText>boolean</TypeText> | Set to `true` if the form doesn't have any errors.<ul><li>`setError` has no effect on `isValid` `formState`, `isValid` will always derived via the entire form validation result.</li></ul> |
3232
| `isValidating` | <TypeText>boolean</TypeText> | Set to `true` during validation. |
33-
| `validatingFields` | <TypeText>boolean</TypeText> | Capture fields which are getting async validation. |
33+
| `validatingFields` | <TypeText>object</TypeText> | Capture fields which are getting async validation. |
3434
| `errors` | <TypeText>object</TypeText> | An object with field errors. There is also an [ErrorMessage](/docs/useformstate/errormessage) component to retrieve error message easily. |
3535
| `disabled` | <TypeText>boolean</TypeText> | Set to true if the form is disabled via the disabled prop in [useForm](/docs/useform). |
3636
| `isReady` | <TypeText>boolean</TypeText> | Set to true when `formState` subscription setup is ready. <CodeArea withOutCopy rawData={`const {\n setValue,\n formState: { isReady }\n} = useForm();\n\nuseEffect(() => isReady && setValue('test', 'data'), [isReady])`}/> |

src/content/docs/useformstate.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This custom hook allows you to subscribe to each form state, and isolate the re-
4545
| `submitCount` | <TypeText>number</TypeText> | Number of times the form was submitted. |
4646
| `isValid` | <TypeText>boolean</TypeText> | Set to `true` if the form doesn't have any errors.<ul><li>`setError` has no effect on `isValid` `formState`, `isValid` will always derived via the entire form validation result.</li></ul> |
4747
| `isValidating` | <TypeText>boolean</TypeText> | Set to `true` during validation. |
48-
| `validatingFields` | <TypeText>boolean</TypeText> | Capture fields which are getting async validation. |
48+
| `validatingFields` | <TypeText>object</TypeText> | Capture fields which are getting async validation. |
4949
| `errors` | <TypeText>object</TypeText> | An object with field errors. There is also an [ErrorMessage](/docs/useformstate/errormessage) component to retrieve error message easily. |
5050
| `disabled` | <TypeText>boolean</TypeText> | Set to true if the form is disabled via the disabled prop in [useForm](/docs/useform). |
5151

0 commit comments

Comments
 (0)