React Data Grid Undo and redo
Overview
This feature allows you to revert changes made in the data grid. It is very useful in a normal day-to-day routine, especially when the change is unintentional. This feature stacks the changes made with the user interface of the grid. Modifications done programmatically are omitted.
The basic methods are undo()
and redo()
. The undo()
method rolls back the last performed action, and the redo()
method restores it.
This feature is provided by the UndoRedo
plugin, and is enabled by default.
TIP
Not all user-triggered actions are covered by this feature. See the below list of actions that won't be added to the history of changes:
- Sort
- Filter
- Move column
- Move row
Basic demo
Make some changes to the grid below and the use the Ctrl/Cmd + Z command to redo the previous state. Then, use Ctrl/Cmd + Y (or Ctrl/Cmd + Shift + Z) to restore it.
Related keyboard shortcuts
Windows | macOS | Action | Excel | Sheets |
---|---|---|---|---|
Ctrl + Z | Cmd + Z | Undo the last action | ✓ | ✓ |
Ctrl + Y | Cmd + Y | Redo the last action | ✓ | ✓ |
Ctrl + Shift + Z | Cmd + Shift + Z | Redo the last action | ✓ | ✓ |
Related API reference
- Configuration options:
- Core methods:
- Hooks:
- Plugins: