Interface: ToolbarApiV1
ToolbarApi.ToolbarApiV1
Description
Contains APIs to allow toolbar creation, modification, and adjust visibility
Properties
- createToolbarContent
- getToolbarState
- hideAllToolbars
- hideToolbar
- modifyToolbarContent
- showAllToolbars
- showToolbar
Properties
createToolbarContent
• createToolbarContent: (slot
: ToolbarSlotName
, toolbarContent
: ToolbarContent
, toolbarId?
: string
) => Promise
<string
>
Type declaration
▸ (slot
, toolbarContent
, toolbarId?
): Promise
<string
>
Description
Allows the developer to create a toolbar for the current list.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The location on the page to create the toolbar (i.e. "header" | "dashboard" | "footer") |
toolbarContent
|
ToolbarContent
|
An object representing the toolbar including HTMLElements and CSS styling |
toolbarId?
|
string
|
The optional ID of the toolbar to be registered |
Returns
Promise
<string
>
A Promise to be resolved with the id assigned to the created toolbar.
getToolbarState
• getToolbarState: (slot
: ToolbarSlotName
) => ToolbarStateItem
[]
Type declaration
▸ (slot
): ToolbarStateItem
[]
Description
Allows the developer to retrieve the current state of all toolbars in the specified slot.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The slot of toolbars to get. |
Returns
An array of objects containing the state of each toolbar in the specified slot.
hideAllToolbars
• hideAllToolbars: (slot
: ToolbarSlotName
) => void
Type declaration
▸ (slot
): void
Description
Allows the developer to hide all the toolbars within the specified slot.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The slot of toolbars to hide. |
Returns
void
hideToolbar
• hideToolbar: (slot
: ToolbarSlotName
, toolbarId
: string
) => void
Type declaration
▸ (slot
, toolbarId
): void
Description
Allows the developer to hide the specified toolbar.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The location on the page of the toolbar to be hidden (i.e. "header" | "dashboard" | "footer") |
toolbarId
|
string
|
The id of the toolbar to be hidden. |
Returns
void
modifyToolbarContent
• modifyToolbarContent: (slot
: ToolbarSlotName
, toolbarId
: string
, factoryFn
: ToolbarFactory
) => Promise
<void
>
Type declaration
▸ (slot
, toolbarId
, factoryFn
): Promise
<void
>
Description
Allows the developer to modify a toolbar for the current list via a callback function.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The location on the page of the toolbar to be modified (i.e. "header" | "dashboard" | "footer"). |
toolbarId
|
string
|
The id of the toolbar to be modified. |
factoryFn
|
ToolbarFactory
|
A function to be called for modification of the specified toolbar. |
Returns
Promise
<void
>
A Promise to be resolved when the toolbar registry has been updated.
showAllToolbars
• showAllToolbars: (slot
: ToolbarSlotName
) => void
Type declaration
▸ (slot
): void
Description
Allows the developer to show all the toolbars within the specified slot.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The slot of toolbars to show. |
Returns
void
showToolbar
• showToolbar: (slot
: ToolbarSlotName
, toolbarId
: string
) => void
Type declaration
▸ (slot
, toolbarId
): void
Description
Allows the developer to show the specified toolbar.
Parameters
Name | Type | Description |
---|---|---|
slot
|
ToolbarSlotName
|
The location on the page of the toolbar to be shown (i.e. "header" | "dashboard" | "footer"). |
toolbarId
|
string
|
The id of the toolbar to be shown. |
Returns
void