DashboardApi
Functions relating to the AdapTable Dashboard.
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| collapseDashboard() | void | Collapses Dashboard so only Dashboard Header is visible (and not Toolbars' contents) |
| dockDashboard() | void | Docks Dashboard so it 'snaps back' into its customary position above the grid |
| expandDashboard() | void | Expands Dashboard so Toolbars in Active Tab are fully visible |
| floatDashboard() | void | Floats Dashboard so only Dashboard Header is visible (in reduced size); can be dragged to a new location |
| getActiveTab() | DashboardTab | undefined | Returns current Active Tab (if there is one) |
| getActiveTabIndex() | number | undefined | Returns current Active Tab index (if there is one) |
| getCurrentToolbars() | AdaptableDashboardToolbars | string[] | Retrieves all Toolbars in Active Tab |
| getCustomDashboardButtonByLabel(buttonLabel) | AdaptableButton<DashboardButtonContext> | undefined | Retrieves first Custom Button with given Label |
| getCustomDashboardButtons() | AdaptableButton<DashboardButtonContext>[] | Retrieves all Custom Buttons |
| getCustomToolbarByName(customToolbarName) | CustomToolbar | Returns Custom Toolbar with the given name |
| getCustomToolbarHTMLElement(customToolbarName) | HTMLElement | null | 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() | CustomToolbar[] | Retrieves all Custom Toolbars |
| getDashboardState() | DashboardState | Retrieves Dashboard section from Adaptable State |
| getModuleButtons() | AdaptableModuleButtons | Retrieves the Module Buttons in the Dashboard |
| getPinnedToolbars() | AdaptableDashboardToolbars | string[] | Retrieves pinned toolbars |
| getTabByName(tabName) | DashboardTab | Retrieves the Tab from State that matches inputted name |
| getTabs() | DashboardTab[] | Retrieves the Tabs in the Dashboard |
| hideDashboard() | void | Hides the Dashboard so cannot be seen |
| isDashboardCollapsed() | boolean | Is Dashboard Collapsed |
| isDashboardDocked() | boolean | Is Dashboard Docked |
| isDashboardExpanded() | boolean | Is Dashboard Expanded |
| isDashboardFloating() | boolean | Is Dashboard Floating |
| isDashboardHidden() | boolean | Is Dashboard Hidden |
| isDashboardVisible() | boolean | Is Dashboard Visible |
| isToolbarVisible(toolbar) | boolean | Checks if a given Toolbar is visible |
| openDashboardSettingsPanel() | void | Opens Settings Panel with Dashboard section selected and visible |
| refreshDashboard() | void | 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 |
| resetCustomToolbarFormData(customToolbarName) | void | Resets the data of a Custom Toolbar's toolbarForm back to thedefaultValues declared on its fields - clearing any user inputwithout unmounting / re-mounting the toolbar. Useful for "Clear filters" buttons that need to wipe both the grid filter AND the toolbar form's internal state in a single click. |
| setActiveTab(tabName) | void | Selects the Dashboard tab with this name. |
| setActiveTabIndex(tabIndex) | void | Selects the Dashboard tab at this index. |
| setCustomToolbarHTMLContent(customToolbarName, htmlContent) | void | 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) | void | Sets the title shown in the Dashboard header. |
| setModuleButtons(moduleButtons) | void | Sets which Module Buttons are visible |
| setPinnedToolbars(toolbars) | void | Pins toolbars so they stay visible when the active tab changes. |
| setTabs(Tabs) | void | Replaces the tabs shown in the Dashboard. |
| showDashboard() | void | Makes the Dashboard visible |
Method Details
collapseDashboard
Collapses Dashboard so only Dashboard Header is visible (and not Toolbars' contents)
collapseDashboard(): void;Returns
void
dockDashboard
Docks Dashboard so it 'snaps back' into its customary position above the grid
dockDashboard(): void;Returns
void
expandDashboard
Expands Dashboard so Toolbars in Active Tab are fully visible
expandDashboard(): void;Returns
void
floatDashboard
Floats Dashboard so only Dashboard Header is visible (in reduced size); can be dragged to a new location
floatDashboard(): void;Returns
void
getActiveTab
Returns current Active Tab (if there is one)
getActiveTab(): DashboardTab | undefined;Returns
Current Active Tab (if there is one)
DashboardTab | undefined
getActiveTabIndex
Returns current Active Tab index (if there is one)
getActiveTabIndex(): number | undefined;Returns
Current Active Tab index (if there is one)
number | undefined
getCurrentToolbars
Retrieves all Toolbars in Active Tab
getCurrentToolbars(): AdaptableDashboardToolbars | string[];Returns
All Toolbars in Active Tab
AdaptableDashboardToolbars | string[]
getCustomDashboardButtonByLabel
Retrieves first Custom Button with given Label
getCustomDashboardButtonByLabel(buttonLabel: string): AdaptableButton<DashboardButtonContext> | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| buttonLabel | string | the label of the Custom Button to retrieve |
Returns
First Custom Button with given Label
AdaptableButton<DashboardButtonContext> | undefined
getCustomDashboardButtons
Retrieves all Custom Buttons
getCustomDashboardButtons(): AdaptableButton<DashboardButtonContext>[];Returns
All Custom Buttons
AdaptableButton<DashboardButtonContext>[]
getCustomToolbarByName
Returns Custom Toolbar with the given name
getCustomToolbarByName(customToolbarName: string): CustomToolbar;Parameters
| Parameter | Type | Description |
|---|---|---|
| customToolbarName | string | the name of the Custom Toolbar |
Returns
Custom Toolbar with the given name
getCustomToolbarHTMLElement
Returns the HTML Element for the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a render function.
getCustomToolbarHTMLElement(customToolbarName: string): HTMLElement | null;Parameters
| Parameter | Type | Description |
|---|---|---|
| customToolbarName | string | the name of the Custom Toolbar |
Returns
The HTML Element for the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a render function
HTMLElement | null
getCustomToolbars
Retrieves all Custom Toolbars
getCustomToolbars(): CustomToolbar[];Returns
All Custom Toolbars
getDashboardState
Retrieves Dashboard section from Adaptable State
getDashboardState(): DashboardState;Returns
Dashboard section from Adaptable State
getModuleButtons
Retrieves the Module Buttons in the Dashboard
getModuleButtons(): AdaptableModuleButtons;Returns
The Module Buttons in the Dashboard
AdaptableModuleButtons
getPinnedToolbars
Retrieves pinned toolbars
getPinnedToolbars(): AdaptableDashboardToolbars | string[];Returns
Pinned toolbars
AdaptableDashboardToolbars | string[]
getTabByName
Retrieves the Tab from State that matches inputted name
getTabByName(tabName: string): DashboardTab;Parameters
| Parameter | Type | Description |
|---|---|---|
| tabName | string | the tab to check |
Returns
The Tab from State that matches inputted name
getTabs
Retrieves the Tabs in the Dashboard
getTabs(): DashboardTab[];Returns
The Tabs in the Dashboard
hideDashboard
Hides the Dashboard so cannot be seen
hideDashboard(): void;Returns
void
isDashboardCollapsed
Is Dashboard Collapsed
isDashboardCollapsed(): boolean;Returns
true when dashboard Collapsed
boolean
isDashboardDocked
Is Dashboard Docked
isDashboardDocked(): boolean;Returns
true when dashboard Docked
boolean
isDashboardExpanded
Is Dashboard Expanded
isDashboardExpanded(): boolean;Returns
true when dashboard Expanded
boolean
isDashboardFloating
Is Dashboard Floating
isDashboardFloating(): boolean;Returns
true when dashboard Floating
boolean
isDashboardHidden
Is Dashboard Hidden
isDashboardHidden(): boolean;Returns
true when dashboard Hidden
boolean
isDashboardVisible
Is Dashboard Visible
isDashboardVisible(): boolean;Returns
true when dashboard Visible
boolean
isToolbarVisible
Checks if a given Toolbar is visible
isToolbarVisible(toolbar: AdaptableDashboardToolbar | string): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| toolbar | AdaptableDashboardToolbar | string | toolbar to check visibility for |
Returns
true when a given Toolbar is visible
boolean
openDashboardSettingsPanel
Opens Settings Panel with Dashboard section selected and visible
openDashboardSettingsPanel(): void;Returns
void
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
refreshDashboard(): void;Returns
void
resetCustomToolbarFormData
Resets the data of a Custom Toolbar's toolbarForm back to the
defaultValues declared on its fields - clearing any user input
without unmounting / re-mounting the toolbar.
Useful for "Clear filters" buttons that need to wipe both the grid filter AND the toolbar form's internal state in a single click.
resetCustomToolbarFormData(customToolbarName?: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| customToolbarName | string | Name of the Custom Toolbar to reset. If omitted, every Custom Toolbar that currently hosts a toolbarFormis reset. |
Returns
void
setActiveTab
Selects the Dashboard tab with this name.
setActiveTab(tabName: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| tabName | string | Name of the tab |
Returns
void
setActiveTabIndex
Selects the Dashboard tab at this index.
setActiveTabIndex(tabIndex: number): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| tabIndex | number | Zero-based index of the tab |
Returns
void
setCustomToolbarHTMLContent
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!
setCustomToolbarHTMLContent(customToolbarName: string, htmlContent: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| customToolbarName | string | name of Custom Toolbar hosting content |
| htmlContent | string | HTML string to render |
Returns
void
setDashboardTitle
Sets the title shown in the Dashboard header.
setDashboardTitle(title: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| title | string | Title to display |
Returns
void
setModuleButtons
Sets which Module Buttons are visible
setModuleButtons(moduleButtons: AdaptableModuleButtons): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| moduleButtons | AdaptableModuleButtons | buttons to show |
Returns
void
setPinnedToolbars
Pins toolbars so they stay visible when the active tab changes.
setPinnedToolbars(toolbars: AdaptableDashboardToolbars | string[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| toolbars | AdaptableDashboardToolbars | string[] | Toolbars to pin |
Returns
void
setTabs
Replaces the tabs shown in the Dashboard.
setTabs(Tabs: DashboardTab[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| Tabs | DashboardTab[] | Tabs to set, in order |
Returns
void
showDashboard
Makes the Dashboard visible
showDashboard(): void;Returns
void