@univerjs/ui v0.4.2 • Docs
Interface: IMenuSelectorItem<V, T>
Extends
IMenuItemBase
<V
>
Type Parameters
Type Parameter | Default type |
---|---|
V | MenuItemDefaultValueType |
T | undefined |
Properties
Property | Type | Description | Overrides | Inherited from | Defined 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? | string | If two menus reuse the same command (e.g. copy & paste command). They should have the same command id and different ids. | - | IMenuItemBase.commandId | packages/ui/src/services/menu/menu.ts:78 (opens in a new tab) |
description? | string | - | - | IMenuItemBase.description | packages/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? | MenuGroup | Deprecated group will be removed in the future. | - | IMenuItemBase.group | packages/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.icon | packages/ui/src/services/menu/menu.ts:83 (opens in a new tab) |
id | string | ID of the menu item. Normally it should be the same as the ID of the command that it would invoke. | - | IMenuItemBase.id | packages/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.label | packages/ui/src/services/menu/menu.ts:99 (opens in a new tab) |
positions? | OneOrMany <string > | Deprecated positions will be removed in the future. | - | IMenuItemBase.positions | packages/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? | string | If 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.subId | packages/ui/src/services/menu/menu.ts:80 (opens in a new tab) |
title? | string | - | - | IMenuItemBase.title | packages/ui/src/services/menu/menu.ts:81 (opens in a new tab) |
tooltip? | string | - | - | IMenuItemBase.tooltip | packages/ui/src/services/menu/menu.ts:84 (opens in a new tab) |
type | SELECTOR | 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) |