Dashboard Technical Reference
Summary
- The Dashboard can be accessed at run-time through 2 events:
- Dashboard Changed - which fires when anything changes in the Dashboard
- Custom Toolbar Configured - which allows a custom toolbar to be updated
- Dashboard State and Dashboard Options provide design-time configuration Options
- Dashboard API provides run-time access to the Dashboard
Dashboard State
The Dashboard State section contains Dashboard properties that are editable at run-time:
| Property | Description | Default |
|---|---|---|
| ActiveTabIndex | Index of Active Tab (in Tabs collection) | |
| DashboardTitle | Title displayed in Dashboard Header | adaptableId in Adaptable Options |
| FloatingPosition | Position of Dashboard when in Floating mode | |
| IsCollapsed | Is Dashboard collapsed; if true, header is visible (but not Tabs' contents) | false |
| IsFloating | Is Dashboard floating; if true, appears in draggable, minmised form (double-click to revert to default position) | false |
| IsHidden | Whether Dashboard is completely hidden - can be made visible again in Column Menu and Tool Panel | false |
| IsInline | Alternative way of rendering Dashboard, with headers section to left of Toolbars | false |
| ModuleButtons | Buttons which open the Settings Panel screen for associated AdapTable Module | ['SettingsPanel'] |
| PinnedToolbars | Toolbars displayed above Grid (and not in Tab) | |
| Tabs | Named group of Toolbars | Empty Array |
Dasboard Options
The Dashboard Options section contains some Dashboard configuration properties:
| Property | Description | Default |
|---|---|---|
| buttonsLocation | Where in Dashboard to display Module and Custom Buttons | 'right' |
| canFloat | Whether the Dashboard can be floated; if true (the default), double-clicking Dashboard puts it in float mode | true |
| customDashboardButtons | Custom Adaptable Buttons to appear in Dashboard (alongside Module Buttons) | |
| customToolbars | Toolbars provided by Users which contain custom content | |
| showQuickSearchInHeader | Shows Quick Search textbox in the Dashboard Header | true |
Dashboard API
The Dashboard API section provides access to all elements and configuration options in the Dashboard:
| Method | Description |
|---|---|
| collapseDashboard() | Collapses Dashboard so only Dashboard Header is visible (and not Toolbars' contents) |
| dockDashboard() | Docks Dashboard so it 'snaps back' into its customary position above the grid |
| expandDashboard() | Expands Dashboard so Toolbars in Active Tab are fully visible |
| floatDashboard() | Floats Dashboard so only Dashboard Header is visible (in reduced size); can be dragged to a new location |
| getActiveTab() | Returns current Active Tab (if there is one) |
| getActiveTabIndex() | Returns current Active Tab index (if there is one) |
| getCurrentToolbars() | Retrieves all Toolbars in Active Tab |
| getCustomDashboardButtonByLabel(buttonLabel) | Retrieves first Custom Button with given Label |
| getCustomDashboardButtons() | Retrieves all Custom Buttons |
| getCustomToolbarByName(customToolbarName) | Returns Custom Toolbar with the given name |
| getCustomToolbarHTMLElement(customToolbarName) | Returns the HTML Element for the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a render function. |
| getCustomToolbars() | Retrieves all Custom Toolbars |
| getDashboardState() | Retrieves Dashboard section from Adaptable State |
| getModuleButtons() | Retrieves the Module Buttons in the Dashboard |
| getPinnedToolbars() | Retrieves pinned toolbars |
| getTabByName(tabName) | Retrieves the Tab from State that matches inputted name |
| getTabs() | Retrieves the Tabs in the Dashboard |
| hideDashboard() | Hides the Dashboard so cannot be seen |
| isDashboardCollapsed() | Is Dashboard Collapsed |
| isDashboardDocked() | Is Dashboard Docked |
| isDashboardExpanded() | Is Dashboard Expanded |
| isDashboardFloating() | Is Dashboard Floating |
| isDashboardHidden() | Is Dashboard Hidden |
| isDashboardVisible() | Is Dashboard Visible |
| isToolbarVisible(toolbar) | Checks if a given Toolbar is visible |
| openDashboardSettingsPanel() | Opens Settings Panel with Dashboard section selected and visible |
| refreshDashboard() | Refreshes entire Dashboard, including Toolbars and Buttons; particularly relevant for AdapTable built-in elements, as framework components are dependent on the framework specific change detection mechanisms |
| setActiveTab(tabName) | Sets Active Tab in Dashboard |
| setActiveTabIndex(tabIndex) | Sets Active Tab in Dashboard |
| setCustomToolbarHTMLContent(customToolbarName, htmlContent) | Renders the given HTML string in the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a render function! |
| setDashboardTitle(title) | Sets title of Dashboard Header |
| setModuleButtons(moduleButtons) | Sets which Module Buttons are visible |
| setPinnedToolbars(toolbars) | Sets pinned toolbars |
| setTabs(Tabs) | Updates the Tabs in the Dashboard |
| showDashboard() | Makes the Dashboard visible |
AdapTable Events
There are 2 Adaptable Events which are fired by AdapTable related to the Dashboard:
Dashboard Changed Event
The Dashboard Changed Event fires when anything has changed in the Dashboard.
The DashboardChangedInfo object which is provided, includes the trigger for the Change and new and old versions of Dashboard State.
| Property | Description |
|---|---|
| actionName | What caused Dashboard State to change |
| newDashboardState | Current Dashboard State |
| oldDashboardState | Previous Dashboard State |
| isToolbarStateChangedToHidden(toolbarName) | Check if given Toolbar was just changed to hidden state |
| isToolbarStateChangedToVisible(toolbarName) | Check if given Toolbar was just changed to visible state |
Custom Toolbar Configured Event
The Custom Toolbar Configured Event fires when the Configure button has been clicked in a Custom Toolbar.
The CustomToolbarConfiguredInfo simply provides the particular Custom Toolbar where the button was clicked:
| Property | Description |
|---|---|
| customToolbar | Custom Toolbar in which the 'Configure' button has been clicked |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
Events Subscription
Subscribing to the Events is done the same as with all Adaptable Events:
api.eventApi.on('DashboardChanged', (eventInfo: DashboardChangedInfo) => {
});
api.eventApi.on('CustomToolbarConfigured', (eventInfo: CustomToolbarConfiguredInfo) => {
});