API reference: @salmonui/data-grid/engine
DataGridPersistenceOptionsinterface
import type { DataGridPersistenceOptions } from '@salmonui/data-grid/engine';Also exported from @salmonui/data-grid/engine/persistence.
interface DataGridPersistenceOptions extends DataGridStateOptions, DeserializeDataGridStateOptions {
readonly storage: DataGridStateStorageAdapter;
readonly key?: string;
readonly schedule?: (flush: () => void) => void;
readonly onError?: (error: unknown) => void;
}
| Name | Signature | Description |
|---|---|---|
storage | readonly storage: DataGridStateStorageAdapter; | |
keyoptional | readonly key?: string; | Storage key. Default |
scheduleoptional | readonly schedule?: (flush: () => void) => void; | Schedules a coalesced save. Default: one microtask. |
onErroroptional | readonly onError?: (error: unknown) => void; | Load and save failures (storage errors, invalid stored state). |
excludeoptionalinherited | exclude?: readonly DataGridStatePart[]; | Parts left out of reads and restores. |
migrateoptionalinherited | migrate?: ((state: Record<string, unknown>, version: number) => DataGridState | null); | Upgrades a state of another version; return null to reject it. |