Skip to main content

IMenuItemOptions

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

Properties

PropertyTypeDescriptionDefined in
check?booleanFor items preceded by checkboxes, indicates if the item is checked.src/widgets/types.ts:193
description?stringTooltip to be shown on the menu itemsrc/widgets/types.ts:196
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:190
onMouseEnter?() => voidGets invoked when the mouse enters the itemsrc/widgets/types.ts:199
onMouseLeave?() => voidGets invoked when the mouse leaves the itemsrc/widgets/types.ts:202
order?numberPosition in the menusrc/widgets/types.ts:179
radioGroup?stringIdentifies a group of items where only one can be checked at a time.src/widgets/types.ts:176
shortcut?stringShortcut to be shown on the item. NOTE: it does not handle the keypress, just shows the shortcutsrc/widgets/types.ts:182
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:185