-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Introduce DropdownMenu.closeBehavior to control menu closing behavior
#156405
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
Introduce DropdownMenu.closeBehavior to control menu closing behavior
#156405
Conversation
|
drive-by comment to learn what the screen recording app is? |
Screen Studio |
| } | ||
|
|
||
| /// Defines the behavior for closing the dropdown menu when an item is selected. | ||
| enum CloseBehavior { |
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.
Since enums are in the global namespace, this should be called something like DropdownMenuCloseBehavior so it doesn't get confused with something that applies to all kinds of closing something.
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.
Agree! Thank you so much.
gspencergoog
left a comment
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.

Fixes Add option to control whether the root DropdownMenu can be closed or not
This introduces
DropdownMenu.closeBehaviorto provide control overDropdownMenucan be closed in nested menus.Code sample
expand to view the code sample
Demo
dropdown.mp4
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.