Skip to content

chore(dropdown): add split button action example #11753

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

@Mash707
Copy link
Contributor Author

Mash707 commented Apr 10, 2025

@kmcfaul @thatblindgeye I have created a draft for the example. Let me know of the changes required.
Also could you guys also suggest the description and sub heading for the example, I am not sure of it. Thank You

@patternfly-build
Copy link
Contributor

patternfly-build commented Apr 10, 2025

@Mash707
Copy link
Contributor Author

Mash707 commented Apr 10, 2025

There were some a11y issues regarding MenuToggle and MenuToggleCheckbox since I didn't add aria-label to them.
@thatblindgeye do check the aria-labels once, I have added them for now so that the tests don't fail.

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

Event handling is not quite ideal in this example.

In other dropdown examples, if I open the menu using the keyboard, i can hit tab and it will close the menu and put focus on the next focusable element on the page (in the docs, that's usually the button)

In the other dropdown examples, I can also click outside the menu and it will close the menu.

I think it's because this new example might be missing the 'onOpenChange' prop.

@Mash707 Mash707 force-pushed the dropdown-add-split-action-example branch from 6073673 to 6adca58 Compare April 23, 2025 19:57
@Mash707
Copy link
Contributor Author

Mash707 commented Apr 23, 2025

Yes, it was happening due to the missing onOpenChange prop. I have added it and now the menu is closing when clicking outside.

@Mash707 Mash707 requested a review from nicolethoen April 23, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown - split button action example
3 participants