Documentation menu
beforetoolbarcreated
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 the toolbar object. Override the existing tabs and add the custom ones using getTabs() method. Each tab is described by the Tab Object.
Tab Object properties
| Name | Type | Description |
|---|---|---|
| title | String | A label of the tab. |
| id | String | Id used in CSS styles. |
| handler | String | Name of the function that handles click on this tab. |
| icon | String | HTML 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. |
| args | Any | optionalArgument to pass to handler. |
| menu | Array | optionalDropdown menu items. |
| mobile | Boolean | optionalIf false, this tab isn’t shown on mobile devices. |
| ios | Boolean | optionalIf false, this tab isn’t shown on iOS devices. |
| android | Boolean | optionalIf 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.