How to preserve customized submenu shown when cursor moves away

Hi, webix team!

I’m making a custom menu with use of ui.menu component. I’m implementing webix.protoUI() to make a submenu whose items are an array. In the the top of submenu there is a search string to filter menu items.
I have one problem: when I want submenu to be shown on mouseover of parent menu item it’s shown ok, but it immediately disappears when I move cursor out of parent item. I guess it’s happened because custom component is not a child of menu.
Could you propose some workaround? I made my own using inMouseOut of parent menu, but it’s not quite stable and looks not elegant.
Snippet is here: https://snippet.webix.com/rjq9vvf8

Hey @azharinov,

I made my own using inMouseOut of parent menu, but it’s not quite stable and looks not elegant.

I’m assuming you’ve tried something close to this: https://snippet.webix.com/v9m7ceau ?

Could you propose some workaround?

Generally, the menu component isn’t meant to be used in such way, as its submenu is strictly attached to the parent menu. The subviewConfig is merely meant to provide a configuration object for the submenu view, and it is not meant to completely redefine the subview component. In your example you are missing all of the handlers attached to the submenu by default, hence why your popup is closing every time your mouse moves out.

Instead of the original structure, you could initialize a separate popup and show it as your hover over certain menu items: https://snippet.webix.com/vxyjv3fn.

Thank you, it was very helpful! With a little revision it fits my task perfectly))