Closed michalkvasnicak closed 3 years ago
Closing this as won't fix. Why? We need to have checkbox / radio controlled so we can control its UI appearance. It's not possible with simple HTML native way using :checked
prop because we use a logic that depends on checked
state. You have to use Controller
from react-hook-form
to make this components work.
Consider this code:
If you set default value of test to either of these values, defaultChecked is not set. But it works if react-hook-form is not used. Seems like problem with a check detection, react-hook-form probably does not set the value so maybe this can be solved only by Controller?