Make ui.menu wrap inside layout

Hello,

I am developing a toolbar based on ui.menu where different menu items are dynamically added. I’m having a problem where when the user adds too many items, the ui.menu does not wrap to the next line when the menu is included in another layout. Inspecting it with Chrome dev tools shows that the ui.menu itself is wrapping, but the layout isn’t adjusting to the new height. Am I doing something wrong here, or is there a defect in Webix?

This is some sample code showing the problem in a simplified example. (In the product there are lots of other controls around it, which is why it needs to be in its own layout):

https://snippet.webix.com/9uidkcv9

This shows how we want it to behave, but once you add it into a layout it stops working this way:

https://snippet.webix.com/fo9whjve

Thank you for any insight!

Hello,

The default menu widget is designed to take one line or one column, it was not purposed for such kind of auto-flow sizing.

You can mimic menu functionality through webix.template
Please check https://snippet.webix.com/hz4jfw8p
Here the template is used to render menu data and show submenu like control on item click.