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: border button not displaying on the toolbar (#854)

白熱3378b4172832
diff --git a/packages/sheets-ui/src/controllers/menu/border.menu.ts b/packages/sheets-ui/src/controllers/menu/border.menu.ts
index ba02cbbaa0..7a6d85125a 100644
--- a/packages/sheets-ui/src/controllers/menu/border.menu.ts
+++ b/packages/sheets-ui/src/controllers/menu/border.menu.ts
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-import { ICommandService } from '@univerjs/core';
+import { ICommandService, UniverInstanceType } from '@univerjs/core';
import type { IBorderInfo } from '@univerjs/sheets';
import { BorderStyleManagerService, SetBorderBasicCommand } from '@univerjs/sheets';
import type { IMenuSelectorItem } from '@univerjs/ui';
-import { MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';
+import { getMenuHiddenObservable, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';
import type { IAccessor } from '@wendellhu/redi';
import { Observable } from 'rxjs';
@@ -68,8 +68,6 @@ export function CellBorderSelectorMenuItemFactory(accessor: IAccessor): IMenuSel
},
],
value$: borderStyleManagerService.borderInfo$,
- hidden$: new Observable((subscriber) => {
- subscriber.next(true);
- }),
+ hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.SHEET),
};
}