Is it possible to keep Material UI menu open after click on menu item?
I have tried event.stopPropagation()
and event.preventDefault()
with no luck
Any ideas?
Is it possible to keep Material UI menu open after click on menu item?
I have tried event.stopPropagation()
and event.preventDefault()
with no luck
Any ideas?
The Material UI IconMenu component has a 'open' property which you can manage manually set to true to keep the menu open. And then set it to false when you want to close it. If you do this clicking on a MenuItem component will not close the Menu.
See the IconMenu documentation: http://www.material-ui.com/#/components/icon-menu
The new material UI v1 use a onClose
props like : onClose={this.handleClose}
You should just delete this props and it should works.
Check the menu's documentation for more informations
PS : React doesn't actually attach event handlers to the nodes themselves. You can check this answer for more