#<Adaptable.Provider /> props
The heart of an Adaptable instance: identifies it, holds its state and wires up data, modules, events and persistence. Renders no UI itself — put Adaptable.Workspace, Adaptable.UI or your own composition inside.
<Adaptable.Provider adaptableId="app" primaryKey="id" :data="data" :defaultState="state">
<Adaptable.Workspace />
</Adaptable.Provider>The props and the types are the same in the React and the Vue package: both are built from one source. Where a type says Renderable, Vue takes what a render function can return (text, a vnode, an array of them); ComponentType, FunctionComponent and ComponentOverride are a component (a .vue file, defineComponent), or a function of the props that returns vnodes; a children prop is the default slot; an inline style is Vue's CSSProperties.
#adaptableIdrequiredstring
Unique id for this Adaptable instance. Used to identify the instance and to namespace persisted state.
#applyState(context: ApplyStateContext) => JSON
Full control over applying a loaded state to the instance.
#authRolesRecord<string, AdaptablePermission[]>
Maps role names to permission lists — controls what the current user (see userInfo) is allowed to do.
#childrenRenderable
The children of the Adaptable component. Typically <Adaptable.Workspace> or <Adaptable.UI>.
#componentsAdaptableUIComponents<DATA_TYPE>
Overrides for the UI building blocks: custom InfiniteTable / DataSource / AdaptablePopupPortal components, plus any Infinite Table component overrides.
#dataAdaptableData<DATA_TYPE>
The data for the grid: an array, a promise, or a (data-params) function.
Optional when an Adaptable.DataSource wraps the Provider — the component's data is used then. When both are present, this prop wins.
#dataSourceAdaptableDataSourceConfig
Instance-level data-loading behavior (mode / batchSize / refetchOn) when passing data via the data prop. Prefer the Adaptable.DataSource component, which carries the same config alongside its data. Per-view overrides go through view.dataSource / viewDefaults.dataSource.
#defaultStateAdaptableUserState
The initial (uncontrolled) user state for the instance. For the controlled version, use state — pass exactly one of the two.
#eventsAdaptableEventsProp<DATA_TYPE>
Event callbacks: onAlertTrigger (an alert fired), onDataChanges (data edits), onCellDoubleClick (a cell was double-clicked; return { preventEdit: true } to skip edit mode), onCellNoteChange, onCellNoteMention and onReady.
#filterValuesFilterValuesFn
Loads the pickable values for single/multi value column filters. Prefer the Adaptable.DataSource component's filterValues; this prop wins when both are present. Defaults to data.filterValues when the data function carries one (createTdgpDataSource does).
#licenseKeystring
Your Adaptable license key.
#loadState(context: LoadStateContext) => Promise<any | null>
Loads the state from the (remote) storage.
#modulesAdaptableModule[] | XOR<{ include: ModuleIdsType[] }, { exclude: ModuleIdsType[] }>
Modules available for this Adaptable instance.
- Pass an array of module objects from
@adaptabletools/datagrid-react/modules(instance-scoped registration; omit to use the full catalog). - Or filter the default catalog with
{ include }/{ exclude }(legacy).
#onReady(eventInfo: AdaptableReadyContext<DATA_TYPE>) => void
Called once the Adaptable instance is ready.
#onStateChange( state: AdaptableUserState, prevState: AdaptableUserState, ) => void
Called whenever the user state changes.
#onStateChangeWithSelectorsAdaptableStateChangeListener<any>[]
Fine-grained state listeners: each entry has a selector, a callback invoked when the selected slice changes, and an optional equals.
#parseState(context: ParseStateContext) => Promise<JSONPatch>
Gives you the ability to deserialize/parse the state once it was loaded from the (remote) storage.
By default, if this prop is not provided, the state is deserialized using JSON.parse (as it assumed it was serialized with JSON.stringify)
For the opposite operation, see AdaptableProps.serializeState
#persistState(context: PersistStateContext) => Promise<void>
Sends the serialized state to the (remote) storage.
For the inverse operation, see AdaptableProps.loadState
#portalContainerHTMLElement | (() => HTMLElement | null | undefined)
The element popups are rendered into: column and context menus, selects, comboboxes, popovers, tooltips and dialogs.
Defaults to an element appended to document.body. A function is called again whenever the instance re-renders; returning null uses the default.
Column and context menus are kept within the Adaptable.Workspace (or the grid, when there is no workspace) wherever they are rendered.
#primaryKeyrequiredstring
The primary key for the data in Adaptable.
This is the name of the property that should be found in all data rows. The value of this property needs to uniquely identify each row.
#serializeState(context: SerializeStateContext) => Promise<any>
Gives you the ability to serialize the state before it is persisted.
By default, if this prop is not provided, the state is serialized to a JSON string
For the opposite operation, see AdaptableProps.parseState
#stateAdaptableUserState
The controlled user state for the instance. For the uncontrolled version, use defaultState — pass exactly one of the two.
#stateKeystring
The storage key used when persisting and loading state — passed to persistState, loadState and applyState.
#userInfoUserInformation | ((context: UserInformationContext) => UserInformation)
Information about the current user — either an object or a function that returns it. Used together with authRoles to control permissions.