Skip to content

Commit

Permalink
docs: add note to useController page as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrowne committed Apr 28, 2024
1 parent 30f7d93 commit dc2bac1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/data/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,7 @@ setValue('test', '')
Set to <code>true</code> during validation.
</>
),
validatingFields: (
<>
Capture fields which are getting async validation.
</>
),
validatingFields: <>Capture fields which are getting async validation.</>,
},
errors: {
title: "errors",
Expand Down Expand Up @@ -2936,6 +2932,15 @@ const { field: checkbox } = useController({ name: 'test1' })
<code>Controller</code>. It's useful for creating reusable Controlled
input.
</p>
<p>
<strong>Note:</strong> if you simply want to control a field's value
from outside the form, it's not necessary to use{" "}
<code>useController</code>. You can simply use the{" "}
<Link href="/docs/useform#values">
<code>values</code>
</Link>{" "}
option of `useForm`.
</p>
</>
),
},
Expand Down

0 comments on commit dc2bac1

Please sign in to comment.