Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheet): insert row/col undo bug (#1350)
Gpound.liu5781a63d1484
diff --git a/packages/sheets/src/commands/commands/insert-row-col.command.ts b/packages/sheets/src/commands/commands/insert-row-col.command.tsindex 2e56a6e2a7..a4621feb98 100644--- a/packages/sheets/src/commands/commands/insert-row-col.command.ts+++ b/packages/sheets/src/commands/commands/insert-row-col.command.ts@@ -117,8 +117,8 @@ export const InsertRowCommand: ICommand = {if (result.result) {undoRedoService.pushUndoRedo({unitID: params.unitId,- undoMutations: [{ id: RemoveRowMutation.id, params: undoRowInsertionParams }, ...intercepted.redos],- redoMutations: [...intercepted.undos, { id: InsertRowMutation.id, params: insertRowParams }],+ undoMutations: [...intercepted.undos, { id: RemoveRowMutation.id, params: undoRowInsertionParams }],+ redoMutations: [{ id: InsertRowMutation.id, params: insertRowParams }, ...intercepted.redos],});return true;