How to use react-hook-form with material-ui Select component #2989
Unanswered
daveOnactive
asked this question in
Show and tell
Replies: 2 comments 7 replies
-
there is an example in the doc right: https://codesandbox.io/s/react-hook-form-v6-controller-qsd8r?file=/src/index.js? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Let me say that most of the examples of react-hook-form are incomplete. The project needs to follow a mandatory CRUD rule and implement in the examples. How can I deliver a project that doesn't validate some kind of fields like Select? |
Beta Was this translation helpful? Give feedback.
6 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.
-
<Select ..... onChange={e => register({ name: 'nationality', value: e.target.value})} > ..... </Select>
i invoked the register method and passed it an object with name(key) value(value) in the onChange props
Beta Was this translation helpful? Give feedback.
All reactions