Describes an item that can be added to an context menu, see ContextMenu.addItem.

Hierarchy

  • ContextMenuItem

Properties

action: (() => void)

Type declaration

    • (): void
    • Function that will be called when the item is triggered.

      Returns void

checked?: boolean

If present the item will be a checkbox item. The value of this property determines if the checkbox is checked or not.

iconClass?: string

A CSS class name specifying which icon to apply to the item

id?: string

Identifies the context menu item. See ContextMenu.Identifier for a list of identifiers.

label: string

The text label that should be used for the menu item.

separator?: boolean

If the item is a separator, this property will be present and true. If this item is not a separator, this property is undefined.