AdaptableOptions

View as Markdown

Design-time configuration for one AdapTable instance.

These options are fixed by the application. Objects the user can change and that are persisted (Layouts, Alerts, Format Columns, Calculated Columns and the other module objects) belong in , not here.

primaryKey and initialState are required. Every *Options property is optional: omit it to keep that module's defaults.

TypeScript
export interface AdaptableOptions<TData = any, TContext = Record<string,

Properties

PropertyTypeDescriptionDefault
actionColumnOptionsActionColumnOptions<TData>Action Columns: columns of buttons, menus, toggles and other controls that run an action on the row.

The columns themselves are supplied here. They are not part of Initial State.
adaptableContextTContextValues from the host application, passed into every callback and event as adaptableContext.

Use it for things the grid should see but not store, such as the current user, permissions or a service. It is not persisted.
adaptableIdstringIdentifies this grid when more than one AdapTable is on the page.

Also the default key under which state is stored, unless is set. A generated id (adaptable_id_ plus a random number) is used when this is omitted, so state will not survive a reload.
'adaptable_id_$random_number'
adaptableStateKeystringKey under which this grid's state is stored, instead of .

Set it when several grids should share one state, or when the storage key should change without changing adaptableId. is applied only when nothing is already stored under this key.
adaptableId value
alertOptionsAlertOptions<TData>How fired alerts behave: how many are kept, how long a cell or row stays highlighted, and the text shown when an alert fires.

The Alert Definitions themselves (the rules) belong in Initial State.
autogeneratePrimaryKeybooleanInvents a primary key when the data has no unique column.

Use it only as a last resort. Notes, comments, data-change history and row identity then cannot follow a real business key, and some of those features are limited.
false
calculatedColumnOptionsCalculatedColumnOptionsCalculated Columns whose values come from an AdapTableQL expression: formula trace, and how often aggregated columns recompute after row changes.

The column definitions belong in Initial State.
calendarOptionsCalendarOptionsWhich days are working days. Weekend days and holidays are excluded from working-day expression functions.
cellSummaryOptionsCellSummaryOptions<TData>Extra summary operations for the selected cells, beyond the ones AdapTable ships (sum, average and the rest), and how the result is formatted.
chartingOptionsChartingOptionsSaving and reopening AG Grid charts, which containers they open in, and external (non-AG Grid) charts.

Chart definitions the user saves are stored in state. These options control that behaviour.
columnMenuOptionsColumnMenuOptions<TData>Replaces or extends the menu opened from a column header. The callback receives AdapTable's default items.
columnOptionsColumnOptionsColumn captions and friendly names, column types used by Column Scope, and whether a missing column is logged.
commentOptionsCommentOptions<TData>Comments on cells: which cells can be commented, and how threads are loaded and saved.

Comments are not part of AdapTable State. The application loads and persists them through these callbacks.
containerOptionsContainerOptionsDOM elements that host the grid, the AG Grid instance, the Settings Panel, alerts, system status and the transposed view.

Set these when AdapTable is not mounted into the default divs.
contextMenuOptionsContextMenuOptions<TData>Replaces or extends the right-click menu. The callback receives AdapTable's default items.
customSortOptionsCustomSortOptionsComparer functions for a Custom Sort, used when the sort order is not a simple list of values.

The Custom Sort objects (the ordered values) belong in Initial State.
dashboardOptionsDashboardOptionsThe Dashboard above the grid: whether it can float, custom toolbars and buttons, and where the module buttons sit.

Which toolbars are on each tab is stored in Dashboard state.
dataChangeHistoryOptionsDataChangeHistoryOptions<TData>The log of cell value changes: whether it starts active, which changes are recorded, and the undo button.
dataImportOptionsDataImportOptionsThe import wizard: how a file or pasted text becomes rows, how those rows are validated, and how they are written into the grid.
dataSetOptionsDataSetOptions<TData>Named sets of rows the user can switch between. Each set supplies its own data.
editOptionsEditOptions<TData>Cell editing: which cells can be edited, server-side validation, the values offered in a dropdown editor, Plus Minus nudges and Smart Edit.
entitlementOptionsEntitlementOptionsWhich modules a user may see or change. Full, ReadOnly or Hidden, per module or as a default.

A module that defaults to hidden (such as State) stays hidden until moduleEntitlements allows it.
exportOptionsExportOptions<TData>Reports: which system reports, formats and destinations are offered, custom destinations, and whether a column is included.

Report definitions the user creates are stored in Export state.
expressionOptionsExpressionOptions<TData>AdapTableQL: custom functions, which columns and fields an expression may use, case sensitivity, and how the expression editor is presented.

Expressions saved on objects (a filter, an alert rule, a calculated column) live on those objects. These options change how every expression is evaluated and edited.
fdc3OptionsFdc3OptionsFDC3: which intents and contexts this grid raises, listens for and broadcasts, and how a row's columns map onto an FDC3 context.
filterOptionsFilterOptions<TData>Column Filters and the Grid Filter: whether AdapTable's filters are used instead of AG Grid's, the quick filter bar, and the default operator for each data type.

The filters the user creates are stored in the Layout.
flashingCellOptionsFlashingCellOptionsDefaults for a flashing cell when a Flashing Cell definition does not set them: up, down and neutral styles, whether the cell or the row flashes, and for how long.

The definitions themselves belong in Initial State.
formatColumnOptionsFormatColumnOptionsDisplay formatters beyond the ones AdapTable ships, used by Format Columns.

The Format Column objects (which column, which style and format) belong in Initial State.
initialStateInitialStateObjects shipped with the grid for its first run: at least one Layout, plus any Alerts, Format Columns, Calculated Columns and other module objects.

Applied only when no state is already stored for this grid. After that, the stored state is used and later edits to initialState are ignored until that stored state is cleared or the state key changes.
undefined
layoutOptionsLayoutOptions<TData>How Layouts are created and shown: a layout built from the AG Grid column definitions, defaults for a new Table or Pivot Layout, and whether layout extensions are offered in the UI.

The Layout objects belong in Initial State. A grid needs at least one.
licenseKeystringCommercial licence key.

Without a current licence, AdapTable shows licence notices and limits some functionality.
noteOptionsNoteOptionsNotes on cells: which cells can hold a note, the note type applied on creation, and how the timestamp is formatted.

The notes themselves are stored in Note state.
notificationsOptionsNotificationsOptionsToasts: where they appear, how long they stay, and how many system status messages are kept.
pluginsAdaptablePlugin[]Plugins constructed by the application and handed to AdapTable: OpenFin, ipushpull, interop.io and Master-Detail.

Each plugin is created with its own options. This array registers them.
primaryKeystringColumn whose values uniquely identify a row. Required.

AdapTable uses it to find a row for edits, notes, comments, alerts, history and row forms. The values must be unique.
n/a (Mandatory)
quickSearchOptionsQuickSearchOptions<TData>Quick Search: which cells are searched, whether matching rows are filtered, and whether the search is case sensitive.
rowFormOptionsRowFormOptions<TData>Create, clone and edit forms for a row: which columns appear, how the primary key of a new row is set, and whether AdapTable writes the result into the grid.
settingsPanelOptionsSettingsPanelOptionsThe Settings Panel: its title and icon, which modules appear and in which groups, and whether it opens as a modal or a movable window.
stateOptionsStateOptionsWhere state is loaded from and saved to. The default is localStorage.

Replace loadState and persistState to keep state on a server. saveState and applyState change the object just before it is stored or applied.
teamSharingOptionsTeamSharingOptionsSharing Adaptable Objects with other users. The application loads and saves the shared objects; AdapTable does not ship a server.

Turn it on with enableTeamSharing, then provide loadSharedEntities and persistSharedEntities.
toolPanelOptionsToolPanelOptionsThe tool panel beside the grid: custom panels, custom buttons, and whether the panel dropdown is shown.
userInterfaceOptionsUserInterfaceOptions<TData>Shared UI: the application icon, custom icons, editable and read-only cell styles, the colour picker, date inputs, the loading screen, and the names shown for modules.
userNamestringName of the person using this grid.

Stamped on Notes and Comments when the author is not supplied, and shown where Team Sharing records who shared an object.
'anonymous'
wizardOptionsWizardOptionsWizards and the other action popups (Bulk Update, Smart Edit, Cell Summary): modal or window, and the window's position and size.

Independent of the Settings Panel. Ignored when containerOptions.modalContainer places every popup in one element.

Property Details

actionColumnOptions

Action Columns: columns of buttons, menus, toggles and other controls that run an action on the row.

The columns themselves are supplied here. They are not part of Initial State.

TypeScript
actionColumnOptions?: ActionColumnOptions<TData>;
Property Value

ActionColumnOptions<TData>

adaptableContext

Values from the host application, passed into every callback and event as adaptableContext.

Use it for things the grid should see but not store, such as the current user, permissions or a service. It is not persisted.

TypeScript
adaptableContext?: TContext;
Default Value
Property Value

TContext

adaptableId

Identifies this grid when more than one AdapTable is on the page.

Also the default key under which state is stored, unless is set. A generated id (adaptable_id_ plus a random number) is used when this is omitted, so state will not survive a reload.

TypeScript
adaptableId?: string;
Default Value

'adaptable_id_$random_number'

Property Value

string

adaptableStateKey

Key under which this grid's state is stored, instead of .

Set it when several grids should share one state, or when the storage key should change without changing adaptableId. is applied only when nothing is already stored under this key.

TypeScript
adaptableStateKey?: string;
Default Value

adaptableId value

Property Value

string

alertOptions

How fired alerts behave: how many are kept, how long a cell or row stays highlighted, and the text shown when an alert fires.

The Alert Definitions themselves (the rules) belong in Initial State.

TypeScript
alertOptions?: AlertOptions<TData>;
Property Value

AlertOptions<TData>

autogeneratePrimaryKey

Invents a primary key when the data has no unique column.

Use it only as a last resort. Notes, comments, data-change history and row identity then cannot follow a real business key, and some of those features are limited.

TypeScript
autogeneratePrimaryKey?: boolean;
Default Value

false

Property Value

boolean

calculatedColumnOptions

Calculated Columns whose values come from an AdapTableQL expression: formula trace, and how often aggregated columns recompute after row changes.

The column definitions belong in Initial State.

TypeScript
calculatedColumnOptions?: CalculatedColumnOptions;
Property Value

CalculatedColumnOptions

calendarOptions

Which days are working days. Weekend days and holidays are excluded from working-day expression functions.

TypeScript
calendarOptions?: CalendarOptions;
Property Value

CalendarOptions

cellSummaryOptions

Extra summary operations for the selected cells, beyond the ones AdapTable ships (sum, average and the rest), and how the result is formatted.

TypeScript
cellSummaryOptions?: CellSummaryOptions<TData>;
Property Value

CellSummaryOptions<TData>

chartingOptions

Saving and reopening AG Grid charts, which containers they open in, and external (non-AG Grid) charts.

Chart definitions the user saves are stored in state. These options control that behaviour.

TypeScript
chartingOptions?: ChartingOptions;
Property Value

ChartingOptions

columnMenuOptions

Replaces or extends the menu opened from a column header. The callback receives AdapTable's default items.

TypeScript
columnMenuOptions?: ColumnMenuOptions<TData>;
Property Value

ColumnMenuOptions<TData>

columnOptions

Column captions and friendly names, column types used by Column Scope, and whether a missing column is logged.

TypeScript
columnOptions?: ColumnOptions;
Property Value

ColumnOptions

commentOptions

Comments on cells: which cells can be commented, and how threads are loaded and saved.

Comments are not part of AdapTable State. The application loads and persists them through these callbacks.

TypeScript
commentOptions?: CommentOptions<TData>;
Property Value

CommentOptions<TData>

containerOptions

DOM elements that host the grid, the AG Grid instance, the Settings Panel, alerts, system status and the transposed view.

Set these when AdapTable is not mounted into the default divs.

TypeScript
containerOptions?: ContainerOptions;
Property Value

ContainerOptions

contextMenuOptions

Replaces or extends the right-click menu. The callback receives AdapTable's default items.

TypeScript
contextMenuOptions?: ContextMenuOptions<TData>;
Property Value

ContextMenuOptions<TData>

customSortOptions

Comparer functions for a Custom Sort, used when the sort order is not a simple list of values.

The Custom Sort objects (the ordered values) belong in Initial State.

TypeScript
customSortOptions?: CustomSortOptions;
Property Value

CustomSortOptions

dashboardOptions

The Dashboard above the grid: whether it can float, custom toolbars and buttons, and where the module buttons sit.

Which toolbars are on each tab is stored in Dashboard state.

TypeScript
dashboardOptions?: DashboardOptions;
Property Value

DashboardOptions

dataChangeHistoryOptions

The log of cell value changes: whether it starts active, which changes are recorded, and the undo button.

TypeScript
dataChangeHistoryOptions?: DataChangeHistoryOptions<TData>;
Property Value

DataChangeHistoryOptions<TData>

dataImportOptions

The import wizard: how a file or pasted text becomes rows, how those rows are validated, and how they are written into the grid.

TypeScript
dataImportOptions?: DataImportOptions;
Property Value

DataImportOptions

dataSetOptions

Named sets of rows the user can switch between. Each set supplies its own data.

TypeScript
dataSetOptions?: DataSetOptions<TData>;
Property Value

DataSetOptions<TData>

editOptions

Cell editing: which cells can be edited, server-side validation, the values offered in a dropdown editor, Plus Minus nudges and Smart Edit.

TypeScript
editOptions?: EditOptions<TData>;
Property Value

EditOptions<TData>

entitlementOptions

Which modules a user may see or change. Full, ReadOnly or Hidden, per module or as a default.

A module that defaults to hidden (such as State) stays hidden until moduleEntitlements allows it.

TypeScript
entitlementOptions?: EntitlementOptions;
Property Value

EntitlementOptions

exportOptions

Reports: which system reports, formats and destinations are offered, custom destinations, and whether a column is included.

Report definitions the user creates are stored in Export state.

TypeScript
exportOptions?: ExportOptions<TData>;
Property Value

ExportOptions<TData>

expressionOptions

AdapTableQL: custom functions, which columns and fields an expression may use, case sensitivity, and how the expression editor is presented.

Expressions saved on objects (a filter, an alert rule, a calculated column) live on those objects. These options change how every expression is evaluated and edited.

TypeScript
expressionOptions?: ExpressionOptions<TData>;
Property Value

ExpressionOptions<TData>

fdc3Options

FDC3: which intents and contexts this grid raises, listens for and broadcasts, and how a row's columns map onto an FDC3 context.

TypeScript
fdc3Options?: Fdc3Options;
Property Value

Fdc3Options

filterOptions

Column Filters and the Grid Filter: whether AdapTable's filters are used instead of AG Grid's, the quick filter bar, and the default operator for each data type.

The filters the user creates are stored in the Layout.

TypeScript
filterOptions?: FilterOptions<TData>;
Property Value

FilterOptions<TData>

flashingCellOptions

Defaults for a flashing cell when a Flashing Cell definition does not set them: up, down and neutral styles, whether the cell or the row flashes, and for how long.

The definitions themselves belong in Initial State.

TypeScript
flashingCellOptions?: FlashingCellOptions;
Property Value

FlashingCellOptions

formatColumnOptions

Display formatters beyond the ones AdapTable ships, used by Format Columns.

The Format Column objects (which column, which style and format) belong in Initial State.

TypeScript
formatColumnOptions?: FormatColumnOptions;
Property Value

FormatColumnOptions

initialState

Objects shipped with the grid for its first run: at least one Layout, plus any Alerts, Format Columns, Calculated Columns and other module objects.

Applied only when no state is already stored for this grid. After that, the stored state is used and later edits to initialState are ignored until that stored state is cleared or the state key changes.

TypeScript
initialState: InitialState;
Default Value

undefined

Property Value

InitialState

layoutOptions

How Layouts are created and shown: a layout built from the AG Grid column definitions, defaults for a new Table or Pivot Layout, and whether layout extensions are offered in the UI.

The Layout objects belong in Initial State. A grid needs at least one.

TypeScript
layoutOptions?: LayoutOptions<TData>;
Property Value

LayoutOptions<TData>

licenseKey

Commercial licence key.

Without a current licence, AdapTable shows licence notices and limits some functionality.

TypeScript
licenseKey?: string;
Property Value

string

noteOptions

Notes on cells: which cells can hold a note, the note type applied on creation, and how the timestamp is formatted.

The notes themselves are stored in Note state.

TypeScript
noteOptions?: NoteOptions;
Property Value

NoteOptions

notificationsOptions

Toasts: where they appear, how long they stay, and how many system status messages are kept.

TypeScript
notificationsOptions?: NotificationsOptions;
Property Value

NotificationsOptions

plugins

Plugins constructed by the application and handed to AdapTable: OpenFin, ipushpull, interop.io and Master-Detail.

Each plugin is created with its own options. This array registers them.

TypeScript
plugins?: AdaptablePlugin[];
Property Value

AdaptablePlugin[]

primaryKey

Column whose values uniquely identify a row. Required.

AdapTable uses it to find a row for edits, notes, comments, alerts, history and row forms. The values must be unique.

TypeScript
primaryKey: string;
Default Value

n/a (Mandatory)

Property Value

string

quickSearchOptions

Quick Search: which cells are searched, whether matching rows are filtered, and whether the search is case sensitive.

TypeScript
quickSearchOptions?: QuickSearchOptions<TData>;
Property Value

QuickSearchOptions<TData>

rowFormOptions

Create, clone and edit forms for a row: which columns appear, how the primary key of a new row is set, and whether AdapTable writes the result into the grid.

TypeScript
rowFormOptions?: RowFormOptions<TData>;
Property Value

RowFormOptions<TData>

settingsPanelOptions

The Settings Panel: its title and icon, which modules appear and in which groups, and whether it opens as a modal or a movable window.

TypeScript
settingsPanelOptions?: SettingsPanelOptions;
Property Value

SettingsPanelOptions

stateOptions

Where state is loaded from and saved to. The default is localStorage.

Replace loadState and persistState to keep state on a server. saveState and applyState change the object just before it is stored or applied.

TypeScript
stateOptions?: StateOptions;
Property Value

StateOptions

teamSharingOptions

Sharing Adaptable Objects with other users. The application loads and saves the shared objects; AdapTable does not ship a server.

Turn it on with enableTeamSharing, then provide loadSharedEntities and persistSharedEntities.

TypeScript
teamSharingOptions?: TeamSharingOptions;
Property Value

TeamSharingOptions

toolPanelOptions

The tool panel beside the grid: custom panels, custom buttons, and whether the panel dropdown is shown.

TypeScript
toolPanelOptions?: ToolPanelOptions;
Property Value

ToolPanelOptions

userInterfaceOptions

Shared UI: the application icon, custom icons, editable and read-only cell styles, the colour picker, date inputs, the loading screen, and the names shown for modules.

TypeScript
userInterfaceOptions?: UserInterfaceOptions<TData>;
Property Value

UserInterfaceOptions<TData>

userName

Name of the person using this grid.

Stamped on Notes and Comments when the author is not supplied, and shown where Team Sharing records who shared an object.

TypeScript
userName?: string;
Default Value

'anonymous'

Property Value

string

wizardOptions

Wizards and the other action popups (Bulk Update, Smart Edit, Cell Summary): modal or window, and the window's position and size.

Independent of the Settings Panel. Ignored when containerOptions.modalContainer places every popup in one element.

TypeScript
wizardOptions?: WizardOptions;
Property Value

WizardOptions