Undo and redo (TableOptionsIf.undo, tableScope.undoService, only with the option): records every change that goes through the table's one write path (editor, fill handle, paste, cut, Delete; api.applyCellChanges only with recordApiChanges or { undoable: true }) as one step, and marked values of a batch edit. Not recorded: updateCells, setRows (the history is emptied when the rows array is replaced), sorting, filter, row drag.

Since

1.1.99

Hierarchy

  • UndoService

Constructors

Properties

options: UndoOptionsIf

complete options

Methods

  • Records written cells as a step (called by the table's write path).

    Parameters

    • changes: CellChangeIf<any>[]

      the written cells

    • source: CellChangeSource

      what wrote them

    • Optional undoable: boolean

      api.applyCellChanges(…, { undoable }): overrides recordApiChanges

    Returns void

  • Undoes the last step: writes the old values back (source "undo"), selects the cells, announces it.

    Returns boolean

    true if a step was undone