-
-
Notifications
You must be signed in to change notification settings - Fork 405
Closed
Labels
featureNew feature or enhancement requestNew feature or enhancement requesthas workaroundIssue has a temporary solutionIssue has a temporary solution
Description
Motivation
When using MenuItemRadio
in controlled mode, the onChange
callback is usually used to read the new value and therefore set the new radio checked state, but this is currently not possible.
Usage example
<DropdownMenuRadioItem
name="radio"
value="one"
checked={ radioValue === 'one' }
onChange={ ( e ) => setRadioValue( e.target.value ) }
>
Radio item 1
</DropdownMenuRadioItem>
Requirements
- The
onChange
prop should expose, as an argument, an event object containinge.target.value
Workaround
Currently consumers of the component need to pass the hardcoded value of the radio
Possible implementations
No response
Metadata
Metadata
Assignees
Labels
featureNew feature or enhancement requestNew feature or enhancement requesthas workaroundIssue has a temporary solutionIssue has a temporary solution