map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface ButtonActionDefinition

    An action definition that provides a button.

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

    Hierarchy (View Summary)

    Index

    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.

    type: "button"

    The type of 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