Using RAC's TextField + React Hook Form #5089
Unanswered
thevipinmishra
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Use <Controller
name="url"
control={control}
render={({ field }) => (
<TextField
label="URL"
{...field}
/>
)}
/> Using |
Beta Was this translation helpful? Give feedback.
1 reply
-
Any documentation? I suppose, it was only for components which are meant to be Controlled only, like MUI. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was giving the TextField component a try, along with React Hook Form.
Now, adding the props returned by
register
function into theTextField
component is not working as expected, I know this can easily be solved by spreading the props on theInput
element that we nest under the TextField anyway, but was curious to know about the API and design decisions.Passing props to TextField shouldn't just work?
Beta Was this translation helpful? Give feedback.
All reactions