Interface SliderActionDefinition

An action definition that provides a slider.

interface SliderActionDefinition {
    changeValueOf(item, value): void;
    fromIcon?: string;
    fromLabel?: string;
    icon?: string;
    id: string;
    isVisibleForItem?(item): boolean | Promise<boolean>;
    label?: string;
    max: number;
    min: number;
    step: number;
    toIcon?: string;
    toLabel?: string;
    valueOf(item): number;
}

Hierarchy (view full)

Properties

fromIcon?: string

Icon of the left side of the slider.

fromLabel?: string

Label of the left side of the slider.

icon?: string

Icon of the menu entry.

id: string

This action's unique id.

label?: string

A textual label (or title) for this action.

max: number

Maximum slider value (right side).

min: number

Minimum slider value (left side).

step: number

Increment value of the slider.

toIcon?: string

Icon of the right side of the slider.

toLabel?: string

Label of the right side of the slider.

Methods

  • This method is called if the value of the slider was changed.

    Parameters

    Returns void

  • 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>

  • This method must return the current value of the item.

    Parameters

    Returns number

Generated using TypeDoc