Set undoRedoCellEditing
on dashGridOptions
to True
to allow users to undo and redo their cell edits when cell editing is enabled. Use undoRedoCellEditingLimit
to configure the number of allowed undo/redo steps. The default is 10
.
dag.AgGrid(
columnDefs=columnDefs,
rowData=df.to_dict("records"),
dashGridOptions={
'undoRedoCellEditing': True,
'undoRedoCellEditingLimit': 20
}
)
Undo and Redo Shortcuts
The following keyboard shortcuts are available when undo/redo cell editing is enabled:
- Ctrl+Z (Windows) / Command+Z (Mac): will undo the last cell edit(s).
- Ctrl+Y (Windows) / Command+Shift+Z (Mac): will redo the last undo.
Note: The grid needs focus for these shortcuts to work.
This example has not been ported to R yet - showing the Python version instead.
Visit the old docs site for R at: https://community.plotly.com/c/dash/r/21