From ca8866eeb9d9342ee2bc22271a0a55f31cee4b3f Mon Sep 17 00:00:00 2001 From: wpxp123456 <2677556700@qq.com> Date: Mon, 12 Jan 2026 19:46:53 +0800 Subject: [PATCH] fix(sheets): fix the worksheet rename event will triggered even if the name unchanged (#6459) --- .../src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx index 15def156a0..58cc8c46be 100644 --- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx +++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx @@ -147,6 +147,11 @@ export function SheetBarTabs() { slideTabBarContainer: slideTabBarContainerRef.current, currentIndex: 0, onChangeName: (subUnitId: string, worksheetName: string) => { + if (workbook.getSheetBySheetId(subUnitId)?.getName() === worksheetName) { + updateSheetItems(); + return; + } + commandService.executeCommand(SetWorksheetNameCommand.id, { subUnitId, name: worksheetName,