Configuring the Tool Panel
Summary
- This page describes how to set up the AdapTable Tool Panel Component in AG Grid
sideBarand AdapTabletoolPanelOptions - A default implementation is suitable for most use cases
- Developers can provide a bespoke
sideBarconfiguration ingridOptionswhen required
Setting up Tool Panel Component
Note
You do not register AdaptableToolPanel yourself in framework apps — AdapTable supplies it when adaptable is included in sideBar. See Version 12 release note only if you still have legacy direct component registration.
There are 3 options available when configuring the sideBar property in AG Grid GridOptions:
SideBar is set to true
This is the most straightforward and uses the default AG Grid and AdapTable settings:
gridOptions.sideBar = trueWhen sideBar is true:
- AG Grid provides the Filters and Columns tool panels
- AdapTable appends the AdapTable tool panel (
adaptable)
Deep Dive
What does AdapTable create when sideBar is true?
List of ToolPanels
A slightly more bespoke alternative is to list which ToolPanels are required:
gridOptions.sideBar =['adaptable', 'filters']When the user provides a list of ToolPanels, the following happens:
- AG Grid will create any AG Grid ToolPanels named in the list
- AdapTable will create the AdapTable Tool Panel (assuming that 'adaptable' is in the list)
- The ToolPanels will display in the order provided
Customised Sidebar
For more advanced scenarios a fully, customised Sidebar can be provided in AG Grid GridOptions.
gridOptions.sideBar ={
toolPanels: [
'filters',
{
id: 'adaptable', // never change this
toolPanel: 'AdaptableToolPanel', // never change this
labelDefault: 'AdapTable',
iconKey: 'menu',
width: 200,
minWidth: 200,
maxWidth: 300,
}
],
defaultToolPanel: 'adaptable',
position: 'left',
}In this scenario:
- the Tool Panels will display in the order provided
- The AdapTable Tool Panel Component will be configured based on the properties provided
Caution
- Make sure that the values for the
idandtoolPanelproperties are not changed - They should remain as 'adaptable' and 'AdaptableToolPanel' respectively
Hiding AdapTable Tool Panel
It is possible to hide the AdapTable Tool Panel but still display one or more of the AG Grid Tool Panels (and / or to provide a custom one).
Hint
To hide the Side Bar altogether simply leave out the sideBar property in AG Grid GridOptions
There are 2 ways to hide the AdapTable Tool Panel:
- setting the Module Entitlement for Tool Panel to
Hidden - leave out
adaptablefrom the list of Tool Panels - e.g. setting:gridOptions.sideBar =['columns', 'filters']
Note
If the Tool Panel Module entitlement is Hidden, the AdapTable Tool Panel will not display even if adaptable is listed in sideBar. See Module Entitlements.
Hiding ToolPanels Dropdown
Option not to display the Tool Panels available at the top of the AdapTable Tool Panel Component.
showToolPanelsDropdown
Default: trueboolean