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