Menus and Submenus

I’m trying to implement a menu with submenus but the submenus aren’t showing.

http://webix.com/snippet/3517e891

Is it because I’m not using the data parameter to define the options? I would rather have the items as iconButtons for aesthetic reasons.

Bump, in case this discussion has been overlooked.

You are using popup in your snippet. This is a valid use-case, but popups can’t have automatic sub-popups. You can implement sub-popups by some custom code, but there is a more simple way - native menu and submenu component

check the updated snippet

http://webix.com/snippet/77b16f14

When working with menu and submenu you can’t use layouts and custom views. Instead of that you can use template to define how menu item must look and behave.

That’s almost what I need, however, I also need to be able to disable/enable some of the options depending on other variables. Using the iconbuttons I was able to do this, but I’m not sure using templates allows me to disable specific items.

I could implement a check in the click handler to see if the action is allowed or not, but is there a better way?

Menu have native support for enabling|disabling

http://webix.com/snippet/ca632075

http://docs.webix.com/api__link__ui.submenu_disableitem.html

Ah, cheers, that’s perfect.