beforeHide
fires before hiding a sub-item of Menu
beforeHide: (id: string | number, events: Event) => void | boolean;
Parameters:
id: string | number
- the ID of a menu sub-itemevents: Event
- a native event object
Returns:
Return false
to prevent hiding of a menu sub-item; otherwise, true
.
Example
menu.events.on("beforeHide", function(id, event){
// your code here
return false;
});