Skip to content
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

ButtonGroup: overflowButton closes when toolbar buttons updated #1118

Open
HaveSpacesuit opened this issue Mar 7, 2023 · 1 comment
Open
Labels
bug Something isn't working has workaround This issue has a workaround or is possible to achieve in user-land.

Comments

@HaveSpacesuit
Copy link
Contributor

HaveSpacesuit commented Mar 7, 2023

Use the overflowButton prop in the <ButtonGroup> to display a <DropdownMenu>. Click the dropdown menu to open it. If any of the items are updated, the dropdown menu is closed.

This may happen if we need to load some command for a toolbar asynchronously. When the logic is updated, the overflow button will be closed.

Alternatively, if using a static <DropdownMenu> in the <ButtonGroup>, the dropdown is not closed when updated (though I see a weird extra button; not sure if this is my implementation...).

Code Sandbox Reproduction:
https://stackblitz.com/edit/github-gye6zf

Clicking the reload sets all buttons to a "loading" state for 5 seconds, and then populates them with the text.

Overflow close

@HaveSpacesuit HaveSpacesuit added the bug Something isn't working label Mar 7, 2023
@elephantcatdog elephantcatdog added the has workaround This issue has a workaround or is possible to achieve in user-land. label Mar 8, 2023
@elephantcatdog
Copy link
Contributor

Hello Eric, thank you for bringing this to our attention! It looks like you've already found a workaround, but this will be added to our backlog and fixed at a later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has workaround This issue has a workaround or is possible to achieve in user-land.
Projects
None yet
Development

No branches or pull requests

2 participants