Unable to disable radio element under Radio group #535
-
Hi, I am unable to disable the radio element under Radio group. What works
This code snippet works and the radio element gets disabled if it is wrapped in <> </> tags, but that renders the radio element unusable since the Radio group now doesn't recognise those. What Doesn't work
This is expected to work, but for some reason, the radio element doesn't get disabled. Can someone please help me with figuring out what's wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @josamit. Currently the RadioGroup passed down certain props to the Radios within the group. So the disabled you have on the one radio is being overwritten by the group. We accounted for a use-case where the whole RadioGroup was disabled, and not individual radios within the group being disabled. Could you explain the use-case a little more so we can figure out a best path forward? Please share any screenshots of if available as well. |
Beta Was this translation helpful? Give feedback.
-
Hi @josamit I just merged a PR #599 that fixes your issue. Please let me know if you still have any concerns with the component. Thanks for calling that out! |
Beta Was this translation helpful? Give feedback.
Hi @josamit. Currently the RadioGroup passed down certain props to the Radios within the group. So the disabled you have on the one radio is being overwritten by the group. We accounted for a use-case where the whole RadioGroup was disabled, and not individual radios within the group being disabled. Could you explain the use-case a little more so we can figure out a best path forward? Please share any screenshots of if available as well.