Skip to main content

IMenuItemOptions

Defined in: src/widgets/types.ts:184

Properties

PropertyTypeDescriptionDefined in
check?booleanFor items preceded by checkboxes, indicates if the item is checked.src/widgets/types.ts:203
description?stringTooltip to be shown on the menu itemsrc/widgets/types.ts:206
isEnabled?() => string | nullA function that gets called each time an item is shown. Should return null if the item is enabled, otherwise the reason why it's disabled. The reason for being disabled is shown in a tooltip.src/widgets/types.ts:200
onMouseEnter?() => voidGets invoked when the mouse enters the itemsrc/widgets/types.ts:209
onMouseLeave?() => voidGets invoked when the mouse leaves the itemsrc/widgets/types.ts:212
order?numberPosition in the menusrc/widgets/types.ts:189
radioGroup?stringIdentifies a group of items where only one can be checked at a time.src/widgets/types.ts:186
shortcut?stringShortcut to be shown on the item. NOTE: it does not handle the keypress, just shows the shortcutsrc/widgets/types.ts:192
visible?booleanWhether the menu is visible; if false, the menu is not added. Might be handy in for-loops and fluent API.src/widgets/types.ts:195