Why is onChange prop required in RadioGroup? #2358
-
Hi Paste team. I'd like to implement an uncontrolled version of the Radio input using Paste, but seems that the RadioGroup component forces us to add an onChange prop (check here). I've been analyzing this component and I'm not able to find the reason for why is this prop required. For example, on line 31, you are checking if the prop is null or not. If this component is meant to be a controlled component, why is only the onChange prop required and not the value prop?. If it is meant to be used as either a controlled or uncontrolled component, shouldn't we change the onChange prop to optional? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Good catch, our RadioGroup is currently controlled only. I have made a ticket in our backlog to review the component and make necessary fixes: https://issues.corp.twilio.com/browse/DSYS-3311. We'll report back when we complete the work. |
Beta Was this translation helpful? Give feedback.
Hi @arodriguezcortes,
Good catch, our RadioGroup is currently controlled only. I have made a ticket in our backlog to review the component and make necessary fixes: https://issues.corp.twilio.com/browse/DSYS-3311.
We'll report back when we complete the work.