Interface TextLabelActionDefinition

An action definition that provides a text label.

interface TextLabelActionDefinition {
    icon?: string;
    id: string;
    isVisibleForItem?(item): boolean | Promise<boolean>;
    label?: string;
    labelMore?: string;
    trigger?(item): void;
    truncationThreshold?: number;
    valueOf(item): undefined | string;
}

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.

labelMore?: string

Label for the "show more" link.

truncationThreshold?: number

Threshold that defines when to auto shorten the text and provide a "show more" link instead.

If set to -1 text is never truncated.

Methods

  • 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 when the "show more" link is clicked. Must be implemented if truncationThreshold is used.

    Parameters

    Returns void

  • Returns a text representation for the given item.

    Parameters

    Returns undefined | string

Generated using TypeDoc