How can I set the id of a webix submenu?

I want to be able to attach events to submenu items like so:

$$(“MySubMenu”).attachEvent(“onItemClick”, function (id) {
____switch(id) …
}

However, i don’t see a way to give a submenu an ID. Maybe something like this would be helpful:


submenu: {
____id: “MySubMenu”,
____data: […]
},

Probably you need onMenuItemClick event
https://docs.webix.com/api__ui.menu_onmenuitemclick_event.html

Thanks it worked!