Documentation

@kanunilabs/pivotgrid-react


@kanunilabs/pivotgrid-react / PivotStateStoringConfig

Interface: PivotStateStoringConfig

Properties

enabled

enabled: boolean


include?

optional include?: readonly "scroll"[]

Session state to keep as well — none by default. 'scroll': where the body was scrolled, put back once the restored pivot is drawn.


onLoad?

optional onLoad?: () => any

custom: the stored state, or a Promise of it (IndexedDB, a server). A Promise is applied when it resolves; nothing is saved until then, so the default layout the grid starts on never overwrites the stored one. To open on the stored layout with no visible switch, read it before mounting and return it synchronously.

Returns

any


onSave?

optional onSave?: (state) => void

custom: called (debounced) with the state to keep — the shape getPersistedState returns.

Parameters

state

any

Returns

void


storageKey?

optional storageKey?: string


type?

optional type?: "localStorage" | "sessionStorage" | "custom"