Skip to content

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.

fix(sheets-data-validation): cant resume data-validation on undo remove-sheet (#3260)

zhangw7e9e69f98694
diff --git a/packages/data-validation/src/controllers/dv-sheet.controller.ts b/packages/data-validation/src/controllers/dv-sheet.controller.ts
index 1f51db602d..511c104ed9 100644
--- a/packages/data-validation/src/controllers/dv-sheet.controller.ts
+++ b/packages/data-validation/src/controllers/dv-sheet.controller.ts
@@ -66,7 +66,7 @@ export class DataValidationSheetController extends Disposable {
const undoParams: IAddDataValidationMutationParams = {
unitId,
subUnitId,
- rule: rules,
+ rule: [...rules],
source: 'patched',
};