Skip to content

[Menu] RadioItem component#534

Merged
michaldudak merged 15 commits intomui:masterfrom
michaldudak:menu-radioitem
Sep 19, 2024
Merged

[Menu] RadioItem component#534
michaldudak merged 15 commits intomui:masterfrom
michaldudak:menu-radioitem

Conversation

@michaldudak
Copy link
Member

@michaldudak michaldudak commented Aug 5, 2024

Created the MenuItemRadioItem and related components.

Closes #53

@michaldudak michaldudak added component: menu Changes related to the menu component. type: new feature Expand the scope of the product to solve a new problem. labels Aug 5, 2024
@mui-bot
Copy link

mui-bot commented Aug 5, 2024

Netlify deploy preview

https://deploy-preview-534--base-ui.netlify.app/

Generated by 🚫 dangerJS against 563d2b1

@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Sep 5, 2024
@michaldudak michaldudak marked this pull request as ready for review September 12, 2024 07:36
Comment on lines +22 to +28
const setValue = React.useCallback(
(newValue: any, event: Event) => {
setValueUnwrapped(newValue);
onValueChange?.(newValue, event);
},
[onValueChange, setValueUnwrapped],
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEventCallback

@colmtuite
Copy link
Contributor

@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?

@michaldudak
Copy link
Member Author

Yeah, it should close after Enter is pressed. I'll fix it.

@michaldudak
Copy link
Member Author

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.

@michaldudak michaldudak merged commit a88a290 into mui:master Sep 19, 2024
@michaldudak michaldudak deleted the menu-radioitem branch September 19, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: menu Changes related to the menu component. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[menu] Create the radio menu item

4 participants