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 via
Options APIon the Adaptable 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.
Find Out More
For the complete generated property list (every root field and xxxOptions type), see AdaptableOptions in the API reference.
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 |
|---|---|---|
| primaryKey | Column containing only unique values, used to identify rows | ✅ |
| autogeneratePrimaryKey | Primary key generated dynamically (if no suitable column) | |
| initialState | AdapTable State designed for first-time use in the application | ✅ |
| adaptableId | Name for this AdapTable instance | |
| adaptableStateKey | Identifier for AdapTable State (used with local storage) | |
| licenseKey | Key required for every commercial AdapTable instance | |
| userName | Name of the current user | |
| adaptableContext | Bespoke Application context included in callbacks & events | |
plugins | Array of AdaptablePlugin instances (see Plugin Options) |
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 these properties:
BaseContext
Base class for all AdapTable callbacks and Events
Adaptable Api object
Custom application Context provided in AdaptableOptions.adaptableContext
string
Id of current AdapTable instance
string
Current Adaptable State Key
Date
Time on user's computer
string
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:
OptionsApi
The Adaptable Options for this instance, including each module's options and the values stored in Adaptable context.
void
Adds a key-value pair to the AdaptableContext
void
Clears all key-value pairs from the AdaptableContext
Readonly<ActionColumnOptions>
Returns AdaptableOptions.actionColumnOptions
TContext
Returns AdaptableOptions.adaptableContext
string
Returns AdaptableOptions.adaptableId
Readonly<AdaptableOptions>
Returns provided AdaptableOptions
string
Returns AdaptableOptions.adaptableStateKey
Readonly<AlertOptions>
Returns AdaptableOptions.alertOptions
Readonly<CalculatedColumnOptions>
Returns AdaptableOptions.calculatedColumnOptions
Readonly<CalendarOptions>
Returns AdaptableOptions.calendarOptions
Readonly<CellSummaryOptions>
Returns AdaptableOptions.cellSummaryOptions
Readonly<ChartingOptions>
Returns AdaptableOptions.chartingOptions
Readonly<ColumnOptions>
Returns AdaptableOptions.columnOptions
Readonly<CommentOptions>
Returns AdaptableOptions.commentOptions
Readonly<ContainerOptions>
Returns AdaptableOptions.containerOptions
Readonly<CustomSortOptions>
Returns AdaptableOptions.customSortOptions
Readonly<DashboardOptions>
Returns AdaptableOptions.dashboardOptions
Readonly<DataChangeHistoryOptions>
Returns AdaptableOptions.dataChangeHistoryOptions
Readonly<DataImportOptions>
Returns AdaptableOptions.dataImportOptions
Readonly<DataSetOptions>
Returns AdaptableOptions.dataSetOptions
Readonly<EditOptions>
Returns AdaptableOptions.editOptions
Readonly<EntitlementOptions>
Returns AdaptableOptions.entitlementOptions
Readonly<ExportOptions>
Returns AdaptableOptions.exportOptions
Readonly<ExpressionOptions>
Returns AdaptableOptions.expressionOptions
Readonly<Fdc3Options>
Returns AdaptableOptions.fdc3Options
Readonly<FilterOptions>
Returns AdaptableOptions.filterOptions
Readonly<FlashingCellOptions>
Returns AdaptableOptions.flashingCellOptions
Readonly<FormatColumnOptions>
Returns AdaptableOptions.formatColumnOptions
Readonly<LayoutOptions>
Returns AdaptableOptions.layoutOptions
string
Returns AdaptableOptions.licenseKey
Readonly<NoteOptions>
Returns AdaptableOptions.noteOptions
Readonly<NotificationsOptions>
Returns AdaptableOptions.notificationsOptions
string
Returns AdaptableOptions.primaryKey
Readonly<QuickSearchOptions>
Returns AdaptableOptions.quickSearchOptions
Readonly<RowFormOptions>
Returns AdaptableOptions.rowFormOptions
Readonly<SettingsPanelOptions>
Returns AdaptableOptions.settingsPanelOptions
Readonly<StateOptions>
Returns AdaptableOptions.stateOptions
Readonly<TeamSharingOptions>
Returns AdaptableOptions.teamSharingOptions
Readonly<ToolPanelOptions>
Returns AdaptableOptions.toolPanelOptions
Readonly<UserInterfaceOptions>
Returns AdaptableOptions.userInterfaceOptions
string
Returns AdaptableOptions.userName
boolean
Returns AdaptableOptions.autogeneratePrimaryKey
void
Removes a key from the AdaptableContext
TypeScript Generics
Adaptable Options fully 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