SYIDAX / DATA GRID

Edit history

Undo or redo cell edits.

Get started
Edit historySample order data
120 rows
Loading Grid…

Options

Changes below update the Grid and code immediately.

Latest result

Edit a Quantity cell and press Enter. Remember the before and after values.

View code
Current preview

Usage guide

#

Restore an accidentally changed quantity or reapply an undone edit.

Try it yourself

  1. Create edit history

    Edit a Quantity cell and press Enter. Remember the before and after values.

  2. Undo

    Click Undo above the table to restore the previous value. The button is disabled when no edit can be undone.

  3. Redo

    Click Redo to reapply the edit. The total changes to match the quantity.

Expected results

Move between previous and changed values for the same order and inspect undo()/redo() results.

New edits and resetting affect history. This does not automatically undo data already saved on the server.

Useful terms

undo / redo
Undo the last edit / reapply an undone edit.
getUndoRedoDepth
Reads available undo and redo history counts.

Key API examples

Application code that references the registered Grid element as grid.

await grid.undo();
await grid.redo();
console.log(await grid.getUndoRedoDepth());

API reference

#

Events1
EventsDetail typeDescription
GridHistoryChangedDetailFires when the undo/redo stack mutates.
Methods4
Method / ArgumentsReturn typeDescription
Promise<boolean>Undo the most recent recorded transaction.
Promise<boolean>Redo the most recently undone transaction.
Promise<void>Clear undo and redo history.
Promise<{ undo: number; redo: number }>Read the current undo and redo stack depths.