2.2.1
Chrome Version 63.0.3239.108 (Official Build) (64-bit)
2.5.13
https://jsfiddle.net/Alexee/jym5u08f/1/
Data: delete children property or make it an empty array
Interaction:
1.hover on normal menu item,
2.showing submenu panel
when hover on the menu item which has no children, hide submenu panel
showing empty panel
Currently the dynamic loading functionality replies on the item to be loaded having a children length of 0. So we may have to keep it as is for now. You can take care of those empty children list on your end, e.g. removing the children prop from the item. Items having no children actually works fine: https://jsfiddle.net/jym5u08f/2/.
To fully resolve this, we may introduce another prop indicating if the item is a leaf node. This will require the users to add such prop to the items if they're using dynamic loading, making it a breaking change. So we'll not do it before a major version.
When hover on normal menu item, submenu panel shows, after that, when hover on empty menu, I expect the submenu panel to hide. @Leopoldthecoder
Just personal opinion, I am not sure how other people feel.
Perhaps we could add a attribute called 'hide-empty-children' that would not result in significant changes. Convenient for developers without manually removing empty child nodes.
Most helpful comment
Perhaps we could add a attribute called 'hide-empty-children' that would not result in significant changes. Convenient for developers without manually removing empty child nodes.