question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

close menu on click

See original GitHub issue

I have to build a menu which includes options but also actions. For this reason I set selectable to false. What would be the best way to destroy the popup after an action is clicked? Using a state property to populate or not the menu doesn’t seem to work well. Thanks!

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
picodothcommented, Jun 9, 2018

Closing for no new activity.

4reactions
picodothcommented, Nov 9, 2018

@adelespinasse you don’t have to do this through this.exportMenu.store.setState({ openKeys: [] });, why not make the menu as a controlled component and you manage the open state yourself with onClick and onOpenChange so it’s neither awkward or breaking abstraction barriers.

I agree we can consider to add a ‘closeSubMenuOnClick’ on menuItem. I’ll keep this issue open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Close menu on click event - javascript - Stack Overflow
First of all, I don't know if it works for you but when you href to /#services/ it doesn't work, so I recommend...
Read more >
How to close a navigation menu when the page is clicked
How to close a navigation menu when the page is clicked · Step 1: Place the event listener on the HTML node, not...
Read more >
close mobile menu on click for anchor links - WordPress.org
Hello,. Is there any tweak to make the mobile menu close after clicking when using anchor link in menu? Thanks.
Read more >
Close Hamburger Menu after click event : r/learnjavascript
Hello I want that my hamburger menu closes after i clicked the a tag. this is my html:'. <header class="header-dropdown">.
Read more >
How to hide the sub menu after a menu item link is clicked
Close desktop menu after click. If you are using a one page theme or have anchor links within your sub menus, and want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found