Tool Panel Technical Reference
Tool Panel State
ToolPanelState
Tool Panel section of Adaptable State, including Initial State.
ToolPanels is the list of panels and whether each is expanded or collapsed. When it is omitted, AdapTable shows a collapsed panel for every module and for every custom tool panel. ModuleButtons are the shortcut buttons in the tool panel; the default is an empty list.
Tool panels to show, and whether each is expanded or collapsed.
When omitted, every module and every custom tool panel is included, collapsed.
AdaptableToolPanelDefinition
One tool panel.
Name is an AdapTable module or a custom panel from Tool Panel Options. VisibilityMode is 'expanded' (the panel body is open) or 'collapsed' (only the header is shown). The default is 'collapsed'.
AdaptableToolPanel | string
ToolPanel name - either an Adaptable Module or a Custom ToolPanel (defined in ToolPanel Options)
'expanded' | 'collapsed'
'expanded' shows the panel body. 'collapsed' shows only the header.
'collapsed'
Name is an AdaptableToolPanel:
| Value |
|---|
'Alert' |
'BulkUpdate' |
'CellSummary' |
'Charting' |
'Dashboard' |
'DataChangeHistory' |
'Export' |
'ColumnFilter' |
'GridFilter' |
'IPushPull' |
'Layout' |
'Note' |
'OpenFin' |
'QuickSearch' |
'SmartEdit' |
'StateManagement' |
'SystemStatus' |
'Theme' |
Tool Panel Options
ToolPanelOptions
Options related to managing the AdapTable ToolPanel Component
ToolPanels provided by Users which contain custom content
Custom Buttons
customButtons is a list of AdaptableButton objects. The click handler receives a ToolPanelButtonContext.
AdaptableButton
A button on a form, alert or toolbar.
label is the text. onClick runs when it is clicked and receives the button and the form or event context. buttonStyle and icon are optional. disabled and hidden are functions that return whether the button is disabled or hidden.
(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean
Function that disables / enables the button based on its evaluation result
AdaptableIcon| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>AdaptableIcon)
Icon for Button - can be object or function that provides a AdaptableIcon object
string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)
Label for Button - can be string or function that provides string
(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => void
Function to invoke when button is clicked
string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)
Tooltip for Button - can be string or function that provides string
buttonStyle is a ButtonStyle:
ButtonStyle
Appearance of an AdapTable button.
variant is 'text', 'outlined' (the default) or 'raised'. tone is the colour: 'neutral' (the default), 'success', 'error', 'warning', 'info', 'accent' or 'none'. className adds a CSS class.
string
CSS Classname to use for the Button
'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent'
Button's Tone - values: 'success', 'error', 'neutral', 'none', 'warning', 'info', 'accent'
'neutral'
'text' | 'outlined' | 'raised'
How Button appears - values: 'text', 'outlined', 'raised'
'outlined'
ToolPanelButtonContext
Context required by functions when using a ToolPanel Button
Current ToolPanel State
Custom application Context provided in AdaptableOptions.adaptableContext
Custom Tool Panels
CustomToolPanel
Defines a Custom ToolPanel - provided by Users and contains custom content
Framework-specific (Angular, React or Vue) component to be rendered
string
Name of Custom ToolPanel - should be unique
(customRenderContext:CustomRenderContext) => string | null
Function to provide bespoke content when using AdapTable Vanilla
string
Title to display in Custom ToolPanel; if undefined, will default to name property
buttons is a list of AdapTable Buttons. The click handler receives a CustomToolPanelButtonContext:
CustomToolPanelButtonContext
Context used for Custom Tool Panels containing Buttons
The Custom ToolPanel which contains the button
Custom application Context provided in AdaptableOptions.adaptableContext
Tool Panel API
ToolPanelApi
Functions for managing the AdapTable ToolPanel Component (at side of grid)
void
Closes the Tool Panel section (irrespective of which toolpanel is showing)
CustomToolPanel | undefined
Retrieves the CustomToolPanel with the given name (or undefined if no match is found)
Retrieves all Custom Tool Panels defined in ToolPanelOptions
Retrieves Tool Panel section from Tool Panel State
void
Opens the Adaptable ToolPanel Component
Expands or collapses one of the AdapTable tool panels.
Expands or collapses a custom tool panel.
void
Opens Settings Panel with Tool Panel section selected and visible