menu
menu copied to clipboard
Hover to open and click to close
Hi, wondering if there is an easy way to configure the menu in the way that it opens the submenu on hover and only close it when click away?
This is exactly the functionality I was trying to make work too. Can't quite work out how to make it happen.
I've found that, in principle, this is achievable by replacing action={...} with showAction={['mouseEnter']} and hideAction={['click']} on the <Trigger> component in SubMenu.jsx.
The problem is that when you have multiple submenus and you switch between them, the previously opened submenus don't close. Not sure how to work around this.
Any updates on this?
I suggest that Antd separates triggerSubMenuOpen and triggerSubMenuClose so that we can set the former to be 'hover' and the latter to be 'click' to realize the default popup menu behavior.