What is necessary to make a checkbox component work with Controller? #2071
-
I have several own components for all kind of inputs and I wanted to use the Controller to integrate all RHF functionalities. For the regular inputs (type is email, password, text, number) everything works perfect but I'm unable to make it work for the checkbox type. Here is a sandbox for it. Can you tell me what I need to do to get the value recognized by RHF? |
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Jul 5, 2020
Replies: 1 comment 3 replies
-
controller's name need to be unique. you may want to build a wrapper component like MUI: https://codesandbox.io/s/react-hook-form-v6-controller-qsd8r take a look the radio group. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
bartylla
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
controller's name need to be unique. you may want to build a wrapper component like MUI: https://codesandbox.io/s/react-hook-form-v6-controller-qsd8r take a look the radio group.