We have updated WebDataRocks EULA, effective as of April 18, 2024. Learn more about what's changed.
Documentation menu

beforetoolbarcreated

beforetoolbarcreated:String

This event is triggered before the Toolbar initialization. Use this event to override the default functionality of the Toolbar and customize it without changing webdatarocks.toolbar.js.

As an argument, beforetoolbarcreated gets toolbar Object. Override the existing tabs and set the custom ones using getTabs() method.

Each tab Object has the following properties:

NameTypeDescription
titleStringA label of the tab.
idStringId is used in CSS styles
handlerStringName of the function that handles click on this tab.
iconStringHTML tag that contains a custom icon for this new tab. You can choose one of the basic vector icons defined in webdatarocks.toolbar.js file.
argsAnyoptionalArgument to pass to handler.
menuArrayoptionalDropdown menu items.
mobileBooleanoptionalIf false, this tab isn’t shown on mobile devices.
iosBooleanoptionalIf false, this tab isn’t shown on iOS devices.
androidBooleanoptionalIf false, this tab isn’t shown on Android devices.

Example

This sample shows how to add tabs to the Toolbar:

Read a detailed Customizing the Toolbar tutorial to change a view and functionality of the Toolbar.