Replies: 2 comments 5 replies
-
can you explain that in code? Controller
take a look this codesandbox for reference: https://codesandbox.io/s/react-hook-form-controller-079xx |
Beta Was this translation helpful? Give feedback.
-
For example:
inside
the same from this file The "Get Started" section mentions something about this in the "Controller" part:
but I don't think it's clear enough about props that |
Beta Was this translation helpful? Give feedback.
-
Mention in the docs that you can't pass any prop to the "as" component in a Controller with the same name as the props the controller may have
Somewhere in the Get Started it mentions that props for "as" component get overridden if they have the same name as Controller props, however this is not mentioned in the API:
https://react-hook-form.com/api#Controller
Furthermore, it does not mention that even props not supplied to but that may have also override props in "As" component.
For instance, even if I am not passing a prop "onChange" to , if I pass a prop "onChange" to "as" then it gets overridden by 's default "onChange".
Beta Was this translation helpful? Give feedback.
All reactions