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

Clicking on submenu items in Tile's MoreOptions doesn't close the menu #2451

Open
1 task done
LostABike opened this issue Feb 26, 2025 · 0 comments · May be fixed by #2452
Open
1 task done

Clicking on submenu items in Tile's MoreOptions doesn't close the menu #2451

LostABike opened this issue Feb 26, 2025 · 0 comments · May be fixed by #2452
Assignees
Labels
bug Something isn't working

Comments

@LostABike
Copy link
Contributor

Describe the bug (current behavior)

In the MoreOptions component of Tile, we pass in a list of MenuItems. However, when a MenuItem contains submenu items, clicking on a submenu item does not automatically close the MoreOptions menu. It also doesn't expose the close function for manual closing on the users side (similar to DropdownMenu menuItems)

Expected Behavior

MoreOptions menu should automatically close when its submenu item is clicked, and/or have the close prop exposed

Link to minimal repro

https://stackblitz.com/edit/github-zvoxjsmy-hsis35df?file=src%2FApp.tsx

Steps To Reproduce

  1. Create a Tile with MoreOptions
  2. Create a MenuItem with submenu item
  3. Pass the MenuItem with submenu item into Tile's MoreOptions
  4. Click to open the MoreOptions menu in Tile
  5. Click on the MenuItem to expose submenu item
  6. Click on submenu item

Package Version

  • I'm using the latest version of iTwinUI.

Anything else?

No response

@LostABike LostABike added the bug Something isn't working label Feb 26, 2025
@r100-stack r100-stack self-assigned this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants