onBeforeFolderToggle
info
This functionality is available in the PRO edition only.
Description
Fires before a tree branch will be opened or closed (the Timeline view, 'tree' mode only)
onBeforeFolderToggle: (section: object | boolean, isOpen: boolean, allSections: boolean) => boolean
Parameters
section- (required) object | boolean - the configuration object of the branch to open/close.
Takes the true value, if all branches will be closed/opened at once by the closeAllSections()/openAllSections() methods.isOpen- (required) boolean - indicates whether the branch will be opened (true) or closed (false)allSections- (required) boolean - takes the true value, if all tree branches will be closed/opened at once by the closeAllSections()/openAllSections() methods, false - if only one branch will be opened/closed.
Returns
result- (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)
Example
scheduler.attachEvent("onBeforeFolderToggle", function(section,isOpen,allSections){
//any custom logic here
return true;
});
Related API
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.