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
flush
jerry1f3ff1d5744f
diff --git a/packages/core/src/Sheets/Domain/Worksheet.ts b/packages/core/src/Sheets/Domain/Worksheet.tsindex ec65ab0f50..b9118faa5c 100644--- a/packages/core/src/Sheets/Domain/Worksheet.ts+++ b/packages/core/src/Sheets/Domain/Worksheet.ts@@ -977,17 +977,12 @@ export class Worksheet {setHiddenAction);_commandManager.invoke(command);+ observer.notifyObservers({ sheet: this });- const needSwitch = this.getStatus() === BooleanNumber.TRUE;- if (needSwitch) {- const index = _workbook.getSheetIndex(this);- const nextSheet = _workbook.nextSheet(index);- if (nextSheet) {- nextSheet.activate();- }+ const index = _workbook.getSheetIndex(this);+ if (index) {+ _workbook.activateSheetByIndex(index);}-- observer.notifyObservers({ sheet: this });}return this;}