@univerjs/ui v0.5.0-beta.1Docs


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.--submodules/univer/packages/ui/src/services/menu/menu.ts:115
commandId?stringIf two menus reuse the same command (e.g. copy & paste command). They should have the same command id and different ids.-IMenuItemBase.commandIdsubmodules/univer/packages/ui/src/services/menu/menu.ts:41
description?string--IMenuItemBase.descriptionsubmodules/univer/packages/ui/src/services/menu/menu.ts:45
disabled$?Observable<boolean>--IMenuItemBase.disabled$submodules/univer/packages/ui/src/services/menu/menu.ts:63
hidden$?Observable<boolean>--IMenuItemBase.hidden$submodules/univer/packages/ui/src/services/menu/menu.ts:62
icon?string | Observable<string>--IMenuItemBase.iconsubmodules/univer/packages/ui/src/services/menu/menu.ts:46
idstringID of the menu item. Normally it should be the same as the ID of the command that it would invoke.-IMenuItemBase.idsubmodules/univer/packages/ui/src/services/menu/menu.ts:35
label?string | { hoverable: boolean; name: string; props: Record<string, any>; }Custom label component id.-IMenuItemBase.labelsubmodules/univer/packages/ui/src/services/menu/menu.ts:54
selections?IValueOption<T>[] | Observable<IValueOption<T>[]>Options or IDs of registered components.--submodules/univer/packages/ui/src/services/menu/menu.ts:112
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.--submodules/univer/packages/ui/src/services/menu/menu.ts:105
subId?string--IMenuItemBase.subIdsubmodules/univer/packages/ui/src/services/menu/menu.ts:43
title?string--IMenuItemBase.titlesubmodules/univer/packages/ui/src/services/menu/menu.ts:44
tooltip?string--IMenuItemBase.tooltipsubmodules/univer/packages/ui/src/services/menu/menu.ts:47
typeSELECTOR | BUTTON_SELECTOR | SUBITEMS-IMenuItemBase.type-submodules/univer/packages/ui/src/services/menu/menu.ts:98
value$?Observable<V>On observable value that should emit the value of the corresponding selection component.-IMenuItemBase.value$submodules/univer/packages/ui/src/services/menu/menu.ts:65