SYIDAX / DATA GRID

Data snapshot

Save and restore source data from a specific point in time.

Get started
Data snapshotSample order data
120 rows
Loading Grid…
Latest result

Call captureSnapshot('Before changes') in your app and retain its returned ID.

View code
Current preview

Usage guide

#

Preserve order data before bulk edits for later comparison or restoration.

Integration steps

  1. Save data before an operation

    Call captureSnapshot('Before changes') in your app and retain its returned ID.

  2. Compare after editing

    After changing data, create another snapshot to compare the two points. Query the list to inspect names and timestamps.

  3. Review the restoration target

    Have users confirm the target snapshot in your app, pass its ID to restoreSnapshot, and inspect the result. Restoration may affect subsequent edits.

Expected results

Preserve a point-in-time data state for comparison or restoration.

Save state below stores view settings such as columns and filters. It is not a data snapshot button; this page has no separate snapshot action UI.

Useful terms

Data snapshot
A record of row data at a specific time.
Grid state
State containing view configuration such as columns, sorting, filters, and selection.

Key API examples

Application code that references the registered Grid element as grid.

const snapshot = await grid.captureSnapshot('Before changes');
console.log(snapshot, await grid.listSnapshots());

API reference

#

Other properties1
Attribute / PropertyType / DefaultDescription
maxSnapshots
numberDefault: 20Cap on retained rowData snapshots (oldest evict first).
Events2
EventsDetail typeDescription
{ id: string; name: string; rowCount: number }Fires when a rowData snapshot is captured.
{ id: string; name: string; rowCount: number }Fires when a rowData snapshot is restored.
Methods5
Method / ArgumentsReturn typeDescription
name?: string
Promise<string>capture the current `rowData` as a named snapshot (a deep copy, immune to later edits) and return its id. A version bookmark, distinct from undo/redo. The list is bounded by `maxSnapshots` (oldest evict first).
Promise<SnapshotMeta[]>the retained snapshots, newest last, without their row payloads.
id: string
Promise<boolean>delete a snapshot by id; returns whether one was removed.
idA: string, idB?: string
Promise<SnapshotDiff<GridRow>>diff snapshot `idA` → `idB` (added / removed / changed rows with per-field before/after). Omit `idB` to diff a snapshot against the CURRENT rowData. Rows match by `getRowId` (else `row.id`, else position). A missing id contributes an empty side.
id: string
Promise<boolean>restore a snapshot: replace `rowData` with a fresh deep copy of the snapshot's rows (re-cloned so later edits don't taint the stored version) and emit `rowDataChanged` with the computed added / updated / removed (matched by getRowId) plus `snapshotRestored`. Returns false when the id is unknown. Undo/redo continues on top of the restored state.