Options
All
  • Public
  • Public/Protected
  • All
Menu

AdaptableOptions is the object created by you at design-time injected into the AdapTable constructor at startup.

AdaptableOptions provides all the layout, DataGrid, config and other information required to ensure a full, rich user experience.

The AdaptableOptions class contains a few regular properties of which 2 (vendorGrid and primaryKey) are mandatory - and a number of xxxOptions properties where the type is itself a collection of related properties.

Typically users will only populate a few of the properties in AdaptableOptions, and only a few properties in each class.

Any property that is not supplied by the user when populating the object, will use the default value (which is listed here for each property).

AdaptableOptions is the only argument used in AdapTable's static constructor.

The contents of AdaptableOptions are:

Option Mandatory Details
adaptableId No A unique ID for this instance of AdapTable
predefinedConfig No User State shipped with AdapTable instance for first use
primaryKey Yes Name of a column guaranteed to contain unique contents
userName No The current AdapTable user (useful for Audit purposes)
vendorGrid Yes Underlying vendor grid object (e.g. GridOptions for ag-Grid)
auditOptions No Audit Log related options
chartOptions No Chart-based options (used when using chart plugin)
configServerOptions No Options related to Config Server (external state management)
editOptions No Editing (and server-editing) related options
exportOptions No Export and reporting related options
filterOptions No Options relating to filtering functionality in AdapTable
generalOptions No General set of Options (e.g. for managing Primary Keys
layoutOptions No Layout (Views) related Options
queryOptions No Options when running a Query ( Expression ) in AdapTable
searchOptions No Search-related options (e.g. for managing Server searching)
stateOptions No Series of functions to allow you to manage AdapTable State
userInterfaceOptions No User Interface related functions (e.g. menus, toolbars)
plugins No Options used by the AdapTable plugins (e.g. charting, finance)

Hierarchy

  • AdaptableOptions

Index

Properties

Optional adaptableId

adaptableId: string

Identifier for this instance of AdapTable

Useful if Audit Log is turned on or you are using multiple grids

Note it cannot contain a '.' (as this value is used to name styles which raises issues if it contains a full stop).

The value provided here is also that used to name the Home Toolbar (the toolbar that appears on the left of the Dashboard).

Default Value: adaptable_id

Optional auditOptions

auditOptions: AuditOptions

Options for mananging the Audit Log.

Depending on the options you set, audit messages will send details of actions in AdapTable to an Audit destination.

Each Audit message is a combination of an AuditTrigger and an AuditDestination, and packaged as a simple JSON object.

You can set as many AuditTriggers as you want, and for each AuditTrigger, select as many AuditDestinations as you require.

The 5 Audit Triggers are:

  • CellEdit: whenever a cell in AdapTable is changed as a result of user action

  • TickingDataUpdate: whenever the data in AdapTable is updated as a result of external action

  • FunctionEvent: whenever an AdapTable function is run (e.g. Quick Search, Smart Edit, Export)

  • UserStateChange: whenever a change is made to the User's state (e.g. selected a new layout)

  • InternalStateChange: whenever a change is made to AdapTable's internal state (e.g. new cells selected)

The 4 possible Audit Destinations are:

  • Http Channel: If you choose this then you need to set up the channel, on which you can subsequently listen to Audit messages using your own internal reporting software (e.g. he Elastic Stack).

  • Console: Audits messages to the console - useful for testing, support and debug purposes

  • Alert: If you set this option for any Trigger, then you can should also choose the Type (e.g. 'Success', 'Info' etc) and whether to show it as a Popup.

  • Event: If selected, you will be able to listen to the the Audit Event using the Audit Event API

Optional chartOptions

chartOptions: ChartOptions

Options to manage AdapTable charting.

Primarily concerned with how and where charts appear.

Optional configServerOptions

configServerOptions: ConfigServerOptions

Options for setting Config Server.

This feature allows for storing user state remotely (as opposed to in local storage, which is the default).

Optional containerOptions

containerOptions: ContainerOptions

Options for setting the Div elements in which AdapTable and the underlying grid are placed.

Also allows you to set where popups appear relative to the page and where charts are displayed.

Optional editOptions

editOptions: EditOptions

Options related to Editing in AdapTable.

Includes a function enabling you to perform custom validation when a cell changes values.

Optional exportOptions

exportOptions: ExportOptions

Options for managing Exporting and Reports in AdapTable.

Optional filterOptions

filterOptions: FilterOptions

Related to creating and managing filters in AdapTable.

Includes options concerning whether to use AdapTable's filters (or those provided by the vendor grid).

Also contains options to set if, how and when the Grid should repaint and refilter after user data edits and ticking data edits.

Optional generalOptions

generalOptions: GeneralOptions

General options to manage AdapTable.

Includes options for managing Server Searching, and how to manage Primary Keys.

Optional layoutOptions

layoutOptions: LayoutOptions

Options related to Layouts (ie. saveable views of column order, visibility and sort).

Includes properties for whether to include vendor state in the Layout (e.g. Column Grouping) and whether layouts should save automatically or manually.

Optional plugins

plugins: AdaptablePlugin[]

Used for managing the AdapTable Plugins.

These allow us to keep the download size of AdapTable manageable while allowing you to access only the functionality you need.

There are currently 2 plugins:

  • Charting

  • Financial

Optional predefinedConfig

predefinedConfig: PredefinedConfig | string

User State (a.ka. predefinedConfig) set at design-time and shipped with AdapTable for first use.

Contains a mixture of objects and properties.

Only used when Config Server is not enabled.

Can be either an PredefinedConfig object or a url to the file which contains the config.

See full details at Predefined Configuration

Default Value: undefined

primaryKey

primaryKey: string

MANDATORY property

The name of a column in the grid guaranteed to contain unique values.

Required for cell identification purpose when cell summary and editing functions.

Also used by Audit Log to identify which cells have been edited.

Note: The column does not need to be visible but it does need to exist in the grid's data source.

Default Value: N/A

Optional queryOptions

queryOptions: QueryOptions

Options for running queries in AdapTable - known as an Expression

Lets you specify how (and how many) values are returned when doing a column lookup, how to deal with case and what is in the Query.

Also includes a callback function allowing devs to populate column lookups dynamically.

Optional searchOptions

searchOptions: SearchOptions

Options for managing Search in AdapTable.

Optional stateOptions

stateOptions: StateOptions

Options related to state hydration / dehydration - allows users to intercept state persistence and state loading.

By default, AdapTable state is persisted in the local storage of the user browser, under the adaptableId key.

These state options allow you to change this default behavior and also to add custom properties or behaviour in the persisted state.

Optional userInterfaceOptions

userInterfaceOptions: UserInterfaceOptions

Options for managing the User Interface elements of AdapTable.

Includes options for themes, menus, tool panels etc.

Optional userName

userName: string

The name of the current AdapTable user.

Strongly recommended to be set if using Config Server.

Also used in Audit Log to identify the current user who has made edits or changed state.

Default Value: anonymous

Optional vendorGrid

vendorGrid: any

MANDATORY property

This is the underlying vendor grid or grid object which AdapTable will interact with.

Depending on the vendor it is either a Grid or an Options object.

The vendorGrid object should contain all the column definitions and data sources required.

Note: if you are using the React Wrapper or the Angular Wrapper then you do not need to populate this property (as gridOptions is a separate parameter and AdapTable will wire up everything for you).

If you are using ag-Grid and want to include Enterprise modules then you should add them to the modules property of ag-Grid.

Default Value: N/A

Generated using TypeDoc