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): unhide hidden icon render incorrect when headers resize (#2208)
siama68bfb9bd144
diff --git a/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts b/packages/sheets-ui/src/controllers/header-unhide.render-controller.tsindex 13c1c0d1a6..e057cb1673 100644--- a/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts+++ b/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts@@ -22,12 +22,18 @@ import {import type { IRenderContext } from '@univerjs/engine-render';import type { ISetSpecificColsVisibleCommandParams, ISetSpecificRowsVisibleCommandParams, ISheetCommandSharedParams } from '@univerjs/sheets';import {+ InsertColMutation,+ InsertRowMutation,+ RemoveColMutation,+ RemoveRowMutation,SetColHiddenMutation,SetColVisibleMutation,SetRowHiddenMutation,SetRowVisibleMutation,SetSpecificColsVisibleCommand,SetSpecificRowsVisibleCommand,+ SetWorksheetColWidthMutation,+ SetWorksheetRowIsAutoHeightMutation,} from '@univerjs/sheets';import { Inject } from '@wendellhu/redi';import { takeUntil } from 'rxjs';@@ -40,6 +46,12 @@ import { getCoordByCell, getSheetObject } from './utils/component-tools';const HEADER_UNHIDE_CONTROLLER_SHAPE = '__SpreadsheetHeaderUnhideSHAPEControllerShape__';const RENDER_COMMANDS: string[] = [+ InsertColMutation.id,+ InsertRowMutation.id,+ RemoveColMutation.id,+ RemoveRowMutation.id,+ SetWorksheetColWidthMutation.id,+ SetWorksheetRowIsAutoHeightMutation.id,SetRowHiddenMutation.id,SetRowVisibleMutation.id,SetColHiddenMutation.id,diff --git a/packages/sheets-ui/src/controllers/menu/menu.ts b/packages/sheets-ui/src/controllers/menu/menu.tsindex 3f45f455fc..65a9f620d8 100644--- a/packages/sheets-ui/src/controllers/menu/menu.ts+++ b/packages/sheets-ui/src/controllers/menu/menu.ts@@ -53,7 +53,9 @@ import {SetTextWrapCommand,SetVerticalTextAlignCommand,SetWorksheetActiveOperation,+ SetWorksheetColWidthMutation,SetWorksheetRowIsAutoHeightCommand,+ SetWorksheetRowIsAutoHeightMutation,} from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';@@ -1178,7 +1180,7 @@ export function SetRowHeightMenuItemFactory(accessor: IAccessor): IMenuButtonIteconst disposable = commandService.onCommandExecuted((c) => {const id = c.id;- if (id === SetRangeValuesMutation.id || id === SetSelectionsOperation.id) {+ if (id === SetRangeValuesMutation.id || id === SetSelectionsOperation.id || id === SetWorksheetRowIsAutoHeightMutation.id) {return update();}});@@ -1222,7 +1224,7 @@ export function SetColWidthMenuItemFactory(accessor: IAccessor): IMenuButtonItemconst disposable = commandService.onCommandExecuted((c) => {const id = c.id;- if (id === SetRangeValuesMutation.id || id === SetSelectionsOperation.id) {+ if (id === SetRangeValuesMutation.id || id === SetSelectionsOperation.id || id === SetWorksheetColWidthMutation.id) {return update();}});