WarUI documentation

Local command log and replay

experimental

Capture committed grid changes in a bounded JSON log and replay them into a fresh instance.

Live example

Expected behavior

Replay restores the same state when the full sequence is retained. The oldest batches are evicted as the log reaches its limit.

Source

const api = createGrid({ rows, columns, commandLog: true });
api.setSelection(['two']);
api.flush();
const saved = JSON.stringify(api.getCommandLog());
freshGrid.replay(JSON.parse(saved));

API reference

GRID-A01-F13 API
KindNameTypeDescription
MethodgetCommandLog—Copies versioned, serializable batches without making a network request.
Methodreplay—Applies recorded commands in sequence, preserving commit boundaries.
MethodsetCommandLogLimit—Keeps the most recent batches within the chosen limit.
MethodclearCommandLog—Removes the recorded batches without changing grid state.