getSubMenu of ui.menu, Methods Webix Docs
gets the submenu object of a menu item (if any)
object getSubMenu(string| number id);
id
| object | object of a child menu (submenu), if any |
Example
$$("mymenu").getSubMenu(id);
Details
The method helps retrieve properties of submenu items:
$$("mymenu").attachEvent("onItemClick", function(id){
var submenu = this.getSubMenu(id);
if(submenu)
//returns text value of a clicked menu item
webix.message("Click: " + submenu.getItem(id).value);
});
See also
If you have not checked yet, be sure to visit site of our main product Webix mvc library and page of javascript menu library product.