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-ui): after unhiding row or col icon doesn't disappear (#2075)

Konv Suuf07c2d9bd5ac
diff --git a/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts b/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts
index 0bb4986e99..13c1c0d1a6 100644
--- a/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts
+++ b/packages/sheets-ui/src/controllers/header-unhide.render-controller.ts
@@ -160,9 +160,8 @@ export class HeaderUnhideRenderController extends RxDisposable {
hovered: false,
hasPrevious,
hasNext,
- left: position.startX - (hasPrevious ? UNHIDE_ICON_SIZE : 0),
-
top: 20 - UNHIDE_ICON_SIZE,
+ left: position.startX - (hasPrevious ? UNHIDE_ICON_SIZE : 0),
},
() => this._commandService.executeCommand<ISetSpecificColsVisibleCommandParams>(
SetSpecificColsVisibleCommand.id,
@@ -177,6 +176,8 @@ export class HeaderUnhideRenderController extends RxDisposable {
scene.addObjects(colShapes, SHEET_COMPONENT_UNHIDE_LAYER_INDEX);
scene.addObjects(rowShapes, SHEET_COMPONENT_UNHIDE_LAYER_INDEX);
+ // 3. clear the previous shapes and update the shapes
+ this._clearShapes();
this._shapes = { cols: colShapes, rows: rowShapes };
}