mirror of
https://github.com/dream-num/univer.git
synced 2026-09-24 15:32:18 +08:00
fix(sheets): fix the worksheet rename event will triggered even if the name unchanged (#6459)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user