Interface ButtonRowActionDefinition

An action definition that provides multiple buttons.

interface ButtonRowActionDefinition {
    actionLabels?: readonly string[];
    actionTooltips?: readonly string[];
    icons: readonly string[];
    id: string;
    isDisabledForItem?(item): boolean[];
    isVisibleForItem?(item): boolean | Promise<boolean>;
    label?: string;
    trigger(item, buttonIndex): void;
}

Hierarchy (view full)

Properties

actionLabels?: readonly string[]

Aria labels for the action buttons. The tooltip values in the array should match the order given in the icons property.

actionTooltips?: readonly string[]

Tooltips for the action buttons. The tooltip values in the array should match the order given in the icons property.

icons: readonly string[]

Icons for the action buttons.

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). The boolean values in the returned array should match the order given in the icons property.

    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. The buttonIndex identifies the target button in this row.

    Parameters

    Returns void

Generated using TypeDoc