Adaptable Options Reference

View as Markdown

Summary

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

Adaptable Options SectionDetails
Base OptionsKey options required for configuring an AdapTable instance
Action Column OptionsConfigures Action Columns
Alert OptionsConfigures Alerts behaviour and forms
Calendar OptionsDefines Holidays
Calculated Column OptionsManages UI options for Calculated Columns
Cell Summary OptionsSupplies Custom Cell Summary Operations
Charting OptionsManages Charts support for AG Grid Charting
Column OptionsOptions relating to different Column types in AdapTable
Column Menu OptionsConfigures the AdapTable Column Menu
Comment OptionsConfigures Comments
Container OptionsManages the different Div elements and popups used by AdapTable
Context Menu OptionsConfigures the AdapTable Context Menu
Custom Sort OptionsProvides Custom Sort Comparers for Custom Sort
Dashboard OptionsSets the Dashboard including custom items
Data Change History OptionsConfigures how Data Change History operates
Data Import OptionsManages Importing Data into AdapTable
Data Set OptionsProvides Data Sets
Edit OptionsManages Editing in AdapTable
Entitlement OptionsUsed for setting up Permissions and Entitlements in AdapTable
Export OptionsConfigures AdapTable Reports and Export Destinations
Expression OptionsOptions for using AdapTableQL Expressions
FDC3 OptionsOptions for when collaborating via FDC3
Filter OptionsConfigures Column Filters and the Grid Filter (filterOptions)
Flashing Cell OptionsManages Flashing Cells functionality in AdapTable
Format Column OptionsManages Custom Display Formats in AdapTable
Layout OptionsHow Layouts in AdapTable will operate
Note OptionsConfigures Notes
Notification OptionsManages Alerts and Toast Notifications
Quick Search OptionsSets up searching in AdapTable
Row Form OptionsConfigures Row Forms
Settings Panel OptionsConfigures the Settings Panel
State OptionsManages how AdapTable State is persisted (and potentially enriched)
Team Sharing OptionsConfigures the Team Sharing functionality in AdapTable
Tool Panel OptionsSets up the AdapTable ToolPanel Component
User Interface OptionsConfigures how the AdapTable UI works
Wizard OptionsOptions for managing size and position of Wizards

Plugin Options

Plugin Options SectionDetails
interop Plugin OptionsOptions for when using the interop.io Plugin
ipushpull Plugin OptionsOptions for when using the ipushpull Plugin
OpenFin Plugin OptionsOptions for when using the OpenFin Plugin
Master Detail Plugin OptionsOptions 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 PropertyDescriptionMandatory
primaryKeyColumn containing only unique values, used to identify rows✅
autogeneratePrimaryKeyPrimary key generated dynamically (if no suitable column)
initialStateAdapTable State designed for first-time use in the application✅
adaptableIdName for this AdapTable instance
adaptableStateKeyIdentifier for AdapTable State (used with local storage)
licenseKeyKey required for every commercial AdapTable instance
userNameName of the current user
adaptableContextBespoke Application context included in callbacks & events
pluginsArray 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:

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.

Adds a key-value pair to the AdaptableContext

Clears all key-value pairs from the AdaptableContext

Returns AdaptableOptions.actionColumnOptions

getAdaptableContext()
returns

TContext

Returns AdaptableOptions.adaptableContext

getAdaptableId()
returns

string

Returns AdaptableOptions.adaptableId

Returns provided AdaptableOptions

Returns AdaptableOptions.adaptableStateKey

Returns AdaptableOptions.alertOptions

Returns AdaptableOptions.calculatedColumnOptions

Returns AdaptableOptions.calendarOptions

Returns AdaptableOptions.cellSummaryOptions

Returns AdaptableOptions.chartingOptions

Returns AdaptableOptions.columnMenuOptions

Returns AdaptableOptions.columnOptions

Returns AdaptableOptions.commentOptions

Returns AdaptableOptions.containerOptions

Returns AdaptableOptions.contextMenuOptions

Returns AdaptableOptions.customSortOptions

Returns AdaptableOptions.dashboardOptions

Returns AdaptableOptions.dataChangeHistoryOptions

Returns AdaptableOptions.dataImportOptions

Returns AdaptableOptions.dataSetOptions

Returns AdaptableOptions.editOptions

Returns AdaptableOptions.entitlementOptions

Returns AdaptableOptions.exportOptions

Returns AdaptableOptions.expressionOptions

Returns AdaptableOptions.fdc3Options

Returns AdaptableOptions.filterOptions

Returns AdaptableOptions.flashingCellOptions

Returns AdaptableOptions.formatColumnOptions

Returns AdaptableOptions.layoutOptions

getLicenseKey()
returns

string

Returns AdaptableOptions.licenseKey

Returns AdaptableOptions.noteOptions

Returns AdaptableOptions.notificationsOptions

getPrimaryKey()
returns

string

Returns AdaptableOptions.primaryKey

Returns AdaptableOptions.quickSearchOptions

Returns AdaptableOptions.rowFormOptions

Returns AdaptableOptions.settingsPanelOptions

Returns AdaptableOptions.stateOptions

Returns AdaptableOptions.teamSharingOptions

Returns AdaptableOptions.toolPanelOptions

Returns AdaptableOptions.userInterfaceOptions

getUserName()
returns

string

Returns AdaptableOptions.userName

Returns AdaptableOptions.autogeneratePrimaryKey

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

Deep Dive

Using Generics in Adaptable Options