API reference: @salmonui/data-grid
DataGridPersistStateinterface
import type { DataGridPersistState } from '@salmonui/data-grid';interface DataGridPersistState {
readonly key?: string;
readonly storage?: DataGridStateStorageAdapter;
readonly exclude?: readonly DataGridStatePart[];
readonly version?: number;
readonly migrate?: (state: Record<string, unknown>, version: number) => DataGridState | null;
}
persistState settings.
| Name | Signature | Description |
|---|---|---|
keyoptional | readonly key?: string; | Storage key. Default |
storageoptional | readonly storage?: DataGridStateStorageAdapter; | Storage with |
excludeoptional | readonly exclude?: readonly DataGridStatePart[]; | State parts that are not saved or restored. |
versionoptional | readonly version?: number; | Application state version. A stored state saved under another
version is discarded unless |
migrateoptional | readonly migrate?: (state: Record<string, unknown>, version: number) => DataGridState | null; | Upgrades a stored state of another schema or application version; return null to discard it. |