API Reference
@univerjs
@univerjs/ui
interfaces
Imenuselectoritem

@univerjs/ui v0.4.2Docs


Interface: IMenuSelectorItem<V, T>

Extends

  • IMenuItemBase<V>

Type Parameters

Type ParameterDefault type
VMenuItemDefaultValueType
Tundefined

Properties

PropertyTypeDescriptionOverridesInherited fromDefined in
activated$?Observable<boolean>If type is MenuItemType.BUTTON_SELECTOR, this determines if the button is activated.--packages/ui/src/services/menu/menu.ts:160 (opens in a new tab)
commandId?stringIf two menus reuse the same command (e.g. copy & paste command). They should have the same command id and different ids.-IMenuItemBase.commandIdpackages/ui/src/services/menu/menu.ts:78 (opens in a new tab)
description?string--IMenuItemBase.descriptionpackages/ui/src/services/menu/menu.ts:82 (opens in a new tab)
disabled$?Observable<boolean>--IMenuItemBase.disabled$packages/ui/src/services/menu/menu.ts:108 (opens in a new tab)
group?MenuGroupDeprecated group will be removed in the future.-IMenuItemBase.grouppackages/ui/src/services/menu/menu.ts:88 (opens in a new tab)
hidden$?Observable<boolean>--IMenuItemBase.hidden$packages/ui/src/services/menu/menu.ts:107 (opens in a new tab)
icon?string | Observable<string>--IMenuItemBase.iconpackages/ui/src/services/menu/menu.ts:83 (opens in a new tab)
idstringID of the menu item. Normally it should be the same as the ID of the command that it would invoke.-IMenuItemBase.idpackages/ui/src/services/menu/menu.ts:72 (opens in a new tab)
label?string | { hoverable: boolean; name: string; props: Record<string, any>; }Custom label component id.-IMenuItemBase.labelpackages/ui/src/services/menu/menu.ts:99 (opens in a new tab)
positions?OneOrMany<string>Deprecated positions will be removed in the future.-IMenuItemBase.positionspackages/ui/src/services/menu/menu.ts:92 (opens in a new tab)
selections?IValueOption<T>[] | Observable<IValueOption<T>[]>Options or IDs of registered components.--packages/ui/src/services/menu/menu.ts:157 (opens in a new tab)
selectionsCommandId?stringIf this property is set, changing the value of the selection will trigger the command with this id, instead of IMenuItemBase.id or IMenuItemBase.commandId. At the same title, clicking the button will trigger IMenuItemBase.id or IMenuItemBase.commandId.--packages/ui/src/services/menu/menu.ts:150 (opens in a new tab)
subId?string--IMenuItemBase.subIdpackages/ui/src/services/menu/menu.ts:80 (opens in a new tab)
title?string--IMenuItemBase.titlepackages/ui/src/services/menu/menu.ts:81 (opens in a new tab)
tooltip?string--IMenuItemBase.tooltippackages/ui/src/services/menu/menu.ts:84 (opens in a new tab)
typeSELECTOR | BUTTON_SELECTOR | SUBITEMS-IMenuItemBase.type-packages/ui/src/services/menu/menu.ts:143 (opens in a new tab)
value$?Observable<V>On observable value that should emit the value of the corresponding selection component.-IMenuItemBase.value$packages/ui/src/services/menu/menu.ts:110 (opens in a new tab)

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.