DashboardApi
Functions relating to the AdapTable Dashboard.
export interfaceMethods
| 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 |
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
DashboardTab | undefined
getActiveTabIndex
Returns current Active Tab index (if there is one)
getActiveTabIndex(): number | undefined;Returns
number | undefined
getCurrentToolbars
Retrieves all Toolbars in Active Tab
getCurrentToolbars(): AdaptableDashboardToolbars | string[];Returns
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
AdaptableButton<DashboardButtonContext> | undefined
getCustomDashboardButtons
Retrieves all Custom Buttons
getCustomDashboardButtons(): AdaptableButton<DashboardButtonContext>[];Returns
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
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
HTMLElement | null
getCustomToolbars
Retrieves all Custom Toolbars
getCustomToolbars(): CustomToolbar[];Returns
getDashboardState
Retrieves Dashboard section from Adaptable State
getDashboardState(): DashboardState;Returns
getModuleButtons
Retrieves the Module Buttons in the Dashboard
getModuleButtons(): AdaptableModuleButtons;Returns
AdaptableModuleButtons
getPinnedToolbars
Retrieves pinned toolbars
getPinnedToolbars(): AdaptableDashboardToolbars | string[];Returns
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
getTabs
Retrieves the Tabs in the Dashboard
getTabs(): DashboardTab[];Returns
hideDashboard
Hides the Dashboard so cannot be seen
hideDashboard(): void;Returns
void
isDashboardCollapsed
Is Dashboard Collapsed
isDashboardCollapsed(): boolean;Returns
boolean
isDashboardDocked
Is Dashboard Docked
isDashboardDocked(): boolean;Returns
boolean
isDashboardExpanded
Is Dashboard Expanded
isDashboardExpanded(): boolean;Returns
boolean
isDashboardFloating
Is Dashboard Floating
isDashboardFloating(): boolean;Returns
boolean
isDashboardHidden
Is Dashboard Hidden
isDashboardHidden(): boolean;Returns
boolean
isDashboardVisible
Is Dashboard Visible
isDashboardVisible(): boolean;Returns
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
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
setActiveTab
Sets Active Tab in Dashboard
setActiveTab(tabName: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| tabName | string | name of tab to set |
Returns
void
setActiveTabIndex
Sets Active Tab in Dashboard
setActiveTabIndex(tabIndex: number): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| tabIndex | number | the tab index to set |
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 title of Dashboard Header
setDashboardTitle(title: string): void;Parameters
| Parameter | Type |
|---|---|
| title | string |
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
Sets pinned toolbars
setPinnedToolbars(toolbars: AdaptableDashboardToolbars | string[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| toolbars | AdaptableDashboardToolbars | string[] |
Returns
void
setTabs
Updates the Tabs in the Dashboard
setTabs(Tabs: DashboardTab[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| Tabs | DashboardTab[] |
Returns
void
showDashboard
Makes the Dashboard visible
showDashboard(): void;Returns
void