Interface: RetreeUndoHistoryOptions#
Defined in: undoHistory.ts:13
Options for createUndoHistory.
Properties#
| Property | Type | Description | Defined in |
|---|
coalesce? | (previous, next) => boolean | Optional predicate that merges a new discrete change into the previous undo step instead of starting a new one. Remarks Called for changes recorded outside a user Retree.runTransaction (changes inside one transaction always coalesce into one step). A discrete ReactiveNode field write counts as outside a transaction even though Retree flushes it through an internal one. Receives the previous step's records and the incoming records; return true to append the incoming records to the previous step. Use this to fold bursts of tiny writes — e.g. per-keystroke text edits to the same field — into one undoable step. | undoHistory.ts:33 |
limit? | number | Maximum number of undo steps to retain. When the history grows past the limit, the oldest step is dropped. Defaults to 100. | undoHistory.ts:18 |