Function: undoMiddleware()
function undoMiddleware<S>(
subtreeRoot,
store?,
options?
): UndoManager;
Creates an undo middleware.
Type Parameters
| Type Parameter |
|---|
S |
Parameters
| Parameter | Type | Description |
|---|---|---|
subtreeRoot | object | Subtree root target object. |
store? | UndoStore | Optional UndoStore where to store the undo/redo queues. Use this if you want to store such queues somewhere in your models. If none is provided it will reside in memory. |
options? | UndoMiddlewareOptions<S> | Extra options, such as how to save / restore certain snapshot of the state to be restored when undoing/redoing. |
Returns
An UndoManager which allows you to do the manage the undo/redo operations and dispose of the middleware.