-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Menu] RadioItem component #534
Conversation
Netlify deploy preview |
bf51bb3
to
cc1caee
Compare
const setValue = React.useCallback( | ||
(newValue: any, event: Event) => { | ||
setValueUnwrapped(newValue); | ||
onValueChange?.(newValue, event); | ||
}, | ||
[onValueChange, setValueUnwrapped], | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEventCallback
@michaldudak I was surprised that the Menu doesn't close when you select a radio item using Enter. Radix closes the menu whether you select a radio/checkbox item via click, space, or Enter. RA closes on Enter only. Do you think we should keep the Menu open always? Or close when you select a radio item using Enter? |
Yeah, it should close after Enter is pressed. I'll fix it. |
I made the change. I won't update the CheckboxItem, as it's the same code. Once RadioItem gets merged, the CheckboxItem will work automatically. |
Created the MenuItemRadioItem and related components.
Closes #53