Interface ButtonActionDefinition

An action definition that provides a button.

interface ButtonActionDefinition {
    icon?: string;
    id: string;
    isDisabledForItem?(item): boolean;
    isVisibleForItem?(item): boolean | Promise<boolean>;
    label?: string;
    trigger(item): void;
}

Hierarchy (view full)

Properties

icon?: string

Icon of the menu entry.

id: string

This action's unique id.

label?: string

A textual label (or title) for this action.

Methods

  • Method to decide if the action should be shown as disabled (optional).

    Parameters

    Returns boolean

  • Returns true if the action shall be available for the given item. Should return false otherwise.

    Note that this method may be asynchronous (i.e. return a Promise<boolean>).

    Parameters

    Returns boolean | Promise<boolean>

  • Called if the menu item is clicked.

    Parameters

    Returns void

Generated using TypeDoc