You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/useform/reset.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Reset the entire form state, fields reference, and subscriptions. There are opti
29
29
30
30
<Admonitiontype="important"title="Rules">
31
31
32
-
- For controlled components you will need to pass `defaultValues` to `useForm` in order to `reset` the `Controller` components' value
32
+
- For controlled components you will need to pass `defaultValues` to `useForm` in order to `reset` the `Controller` components' value.
33
33
- When `defaultValues` is not supplied to `reset` API, then HTML native [reset](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset) API will be invoked to restore the form.
34
34
- Avoid calling `reset` before `useForm`'s `useEffect` is invoked, this is because `useForm`'s subscription needs to be ready before `reset` can send a signal to flush form state update.
35
35
- It's recommended to `reset` inside `useEffect` after submission.
0 commit comments