Options related to Adaptable State hydration / dehydration; allows users to intercept state persistence and loading with custom functionality

TypeScript
export interface

Properties

PropertyDescriptionDefault
applyStateTransforms state before applying it to the application. Called after loadState() but before the state is used.
autoMigrateStateAutomatically migrate State from previous AdapTable version to current onetrue
clearStateAllows clearing of remote Adaptable State. Only invoked during StateApi.reloadInitialState() operations.undefined
debounceStateDelayDelay (in ms) to debounce saveState / persistState calls enabling grouping multiple sequential calls in single one (e.g. elevator doors)400
loadStateRetrieves saved Adaptable State from storage or external source
persistStateHandles the actual storage of state to localStorage, server, etc. Called after saveState() to store the prepared state.
saveStateTransforms state before saving to storage. Called before persistState().

Property Details

applyState

Transforms state before applying it to the application. Called after loadState() but before the state is used.

TypeScript
applyState?: AdaptableApplyStateFunction;
Property Value

AdaptableApplyStateFunction

autoMigrateState

Automatically migrate State from previous AdapTable version to current one

TypeScript
autoMigrateState?: boolean;
Default Value

true

Property Value

boolean

clearState

Allows clearing of remote Adaptable State. Only invoked during StateApi.reloadInitialState() operations.

TypeScript
clearState?: AdaptableClearStateFunction;
Default Value

undefined

Property Value

AdaptableClearStateFunction

debounceStateDelay

Delay (in ms) to debounce saveState / persistState calls enabling grouping multiple sequential calls in single one (e.g. elevator doors)

Defaults to: 400. Also, the wait will be max 1000ms, at which point the save/persist calls will happen anyway.

TypeScript
debounceStateDelay?: number;
Default Value

400

Property Value

number

loadState

Retrieves saved Adaptable State from storage or external source

TypeScript
loadState?: AdaptableLoadStateFunction;
Property Value

AdaptableLoadStateFunction

persistState

Handles the actual storage of state to localStorage, server, etc. Called after saveState() to store the prepared state.

TypeScript
persistState?: AdaptablePersistStateFunction;
Property Value

AdaptablePersistStateFunction

saveState

Transforms state before saving to storage. Called before persistState().

TypeScript
saveState?: AdaptableSaveStateFunction;
Property Value

AdaptableSaveStateFunction