issue: disabled property in useForm applied to Form Provider does not apply to all radio inputs #11842
Closed
1 task done
Labels
bug
Something isn't working
Version Number
7.51.3
Codesandbox/Expo snack
Link to Codesandbox
Steps to reproduce
Expected behaviour
Both radio inputs should be disabled.
From my understanding, this is happening because both radio inputs are registered with the same name so it only applies the disabled validation to the first one occurring with that name. However, grouped radio inputs are supposed to share the same name and it's their id that differentiates them.
This is my workaround for now:
I've also tried the following:
disabled
property fromuseFormState
But neither worked. Might there be a better or suggested way for radio inputs to pick up on the whole form being set to disabled? I'd like to avoid having to pass down the
canEdit
prop all the way to the radio inputs, especially because I thought the purpose of setting the disabled state in theFormProvider
was so that all the inputs could pick up on it and there would be no prop drilling needed.What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: