Adaptable Options Reference
Summary
- Adaptable Options are configuration properties provided by developers at Design-Time
- They are designed to help developers set up AdapTable to fit their precise requirements
- Adaptable Options includes many properties and options sets including:
- options to manage Searches, Column Filters, Layouts, Editing etc.
- configuration settings for the AdapTable UI: Settings Panel, Dashboard, Tool Panel etc.
- advanced Grid functionality like AdapTableQL, Team Sharing, Menus, Entitlements & State Management
- any Initial Adaptable State required for first-time application use
- many other grouped sets of options required to ensure a full, rich user experience
- Run time access to Adaptable Options is available in Options API
AdaptableOptions is the only object created that AdapTable requires to initialise and run.
It is set up by developers at design-time and passed into the AdapTable constructor at startup.
Caution
- Adaptable Options contains behaviour and functionality that will never change at run-time.
- Initial Adaptable State contains objects that users can amend and delete through the AdapTable UI.
The AdaptableOptions class consists of a few 'base' properties and a number of xxxOptions properties which are themselves collections of related properties (e.g. Search, Layout).
Hint
- Typically you will only need to populate a few of the properties in base AdaptableOptions
- And you will likely only require a few of the properties in some of the xxxOptions classes.
Any property that is not supplied by the user when populating the object, will use the default value which is the most sensible and popular option.
Adaptable Options Contents
Plugin Options
| Plugin Options Section | Details |
|---|---|
| interop Plugin Options | Options for when using the interop.io Plugin |
| ipushpull Plugin Options | Options for when using the ipushpull Plugin |
| OpenFin Plugin Options | Options for when using the OpenFin Plugin |
| Master Detail Plugin Options | Options for creating Master Detail Grids |
Base Options
Base Options are the properties in the root of Adaptable Options that are not grouped into a section.
Hint
- These are generally the more important options that need to be set
- You should try to provide values for each of these properties
The properties in the root of Adaptable Options include:
| Base Options Property | Description | Mandatory |
|---|---|---|
| adaptableId | Name for this AdapTable instance | |
| adaptableStateKey | Identifier for AdapTable State (used with local storage) | |
| licenseKey | Key required for every commercial AdapTable instance | |
| initialState | AdapTable State designed for first time use in Application | ✅ |
| primaryKey | Column containing only unique values, used to identify rows | ✅ |
| userName | Name of the Current User | |
| adaptableContext | Context to use in your application (can be anything) |
Function Properties Context
Each section in AdapTable Options is made up of a mix of 2 elements:
- properties that require a value which is a primitive data type (i.e. a string, number, date or boolean)
- properties that require custom functions to supplied (which will return the required value)
Hint
Many properties can be of either element, e.g. can be a string or a function that returns a string
Nearly all functions used by AdapTable Options take a single object as the argument.
This object is usually named xxxContext, and contains function-specific data.
Note
This is very similar to the xxxParams pattern used by AG Grid
Each context object derives from BaseContext object which contains 3 properties:
| Property | Description |
|---|---|
| adaptableApi | Adaptable Api object |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
| adaptableId | Id of current AdapTable instance |
| adaptableStateKey | Current Adaptable State Key |
| clientTimestamp | Time on user's computer |
| userName | Name of Current User |
Run-Time Access
AdapTable makes run time access to Adaptable Options available via Options API in Adaptable API:
The full set of convenience functions to enable easy access to Adaptable Options properties is:
| Method | Description |
|---|---|
| addToAdaptableContext(key, value) | Adds a key-value pair to the AdaptableContext |
| clearAdaptableContext() | Clears all key-value pairs from the AdaptableContext |
| getActionColumnOptions() | Returns AdaptableOptions.actionColumnOptions |
| getAdaptableContext() | Returns AdaptableOptions.adaptableContext |
| getAdaptableId() | Returns AdaptableOptions.adaptableId |
| getAdaptableOptions() | Returns provided AdaptableOptions |
| getAdaptableStateKey() | Returns AdaptableOptions.adaptableStateKey |
| getAlertOptions() | Returns AdaptableOptions.alertOptions |
| getCalendarOptions() | Returns AdaptableOptions.calendarOptions |
| getCellSummaryOptions() | Returns AdaptableOptions.cellSummaryOptions |
| getChartingOptions() | Returns AdaptableOptions.chartingOptions |
| getColumnMenuOptions() | Returns AdaptableOptions.columnMenuOptions |
| getColumnOptions() | Returns AdaptableOptions.columnOptions |
| getCommentOptions() | Returns AdaptableOptions.commentOptions |
| getContainerOptions() | Returns AdaptableOptions.containerOptions |
| getContextMenuOptions() | Returns AdaptableOptions.contextMenuOptions |
| getCustomSortOptions() | Returns AdaptableOptions.customSortOptions |
| getDashboardOptions() | Returns AdaptableOptions.dashboardOptions |
| getDataChangeHistoryOptions() | Returns AdaptableOptions.dataChangeHistoryOptions |
| getDataImportOptions() | Returns AdaptableOptions.dataImportOptions |
| getDataSetOptions() | Returns AdaptableOptions.dataSetOptions |
| getEditOptions() | Returns AdaptableOptions.editOptions |
| getEntitlementOptions() | Returns AdaptableOptions.entitlementOptions |
| getExportOptions() | Returns AdaptableOptions.exportOptions |
| getExpressionOptions() | Returns AdaptableOptions.expressionOptions |
| getFdc3Options() | Returns AdaptableOptions.fdc3Options |
| getFilterOptions() | Returns AdaptableOptions.filterOptions |
| getFlashingCellOptions() | Returns AdaptableOptions.flashingCellOptions |
| getFormatColumnOptions() | Returns AdaptableOptions.formatColumnOptions |
| getLayoutOptions() | Returns AdaptableOptions.layoutOptions |
| getLicenseKey() | Returns AdaptableOptions.licenseKey |
| getNoteOptions() | Returns AdaptableOptions.noteOptions |
| getNotificationsOptions() | Returns AdaptableOptions.notificationsOptions |
| getPredicateOptions() | Returns AdaptableOptions.predicateOptions |
| getPrimaryKey() | Returns AdaptableOptions.primaryKey |
| getQuickSearchOptions() | Returns AdaptableOptions.quickSearchOptions |
| getRowFormOptions() | Returns AdaptableOptions.rowFormOptions |
| getSettingsPanelOptions() | Returns AdaptableOptions.settingsPanelOptions |
| getStateOptions() | Returns AdaptableOptions.stateOptions |
| getTeamSharingOptions() | Returns AdaptableOptions.teamSharingOptions |
| getToolPanelOptions() | Returns AdaptableOptions.toolPanelOptions |
| getUserInterfaceOptions() | Returns AdaptableOptions.userInterfaceOptions |
| getUserName() | Returns AdaptableOptions.userName |
| isAutogeneratePrimaryKey() | Returns AdaptableOptions.autogeneratePrimaryKey |
| removeFromAdaptableContext(key) | Removes a key from the AdaptableContext |
TypeScript Generics
Since AdapTable Version 15, Adaptable Options supports TypeScript Generics.
This allows for improved type safety and developer experience by providing the row data type to the Adaptable Options definition.
Hint
This integrates seamlessly with the AG Grid TypeScript Generics for Row Data