(fn: () => T | Promise<T>)
| 86 | * mutations inside `executeAction` don't accidentally push new undo entries. |
| 87 | */ |
| 88 | export async function runWithoutRecording<T>(fn: () => T | Promise<T>): Promise<T> { |
| 89 | undoRedoInProgress = true |
| 90 | try { |
| 91 | return await fn() |
| 92 | } finally { |
| 93 | undoRedoInProgress = false |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | export const useTableUndoStore = create<TableUndoState>()( |
| 98 | devtools( |