blessed-components - v1.20.0
    Preparing search index...

    Interface MenuHandle<TItem>

    Imperative handle returned by menu.

    interface MenuHandle<TItem extends MenuItem = MenuItem> {
        activateActive(): TItem | undefined;
        activeId(): string | undefined;
        focus(): void;
        focusItem(id: string): string | undefined;
        first(): string | undefined;
        last(): string | undefined;
        next(): string | undefined;
        pageBackward(): string | undefined;
        pageForward(): string | undefined;
        previous(): string | undefined;
        element: BoxElement;
        destroy(): void;
        setData(data: MenuData): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    element: BoxElement

    Underlying Blessed element available for standard element operations.

    Methods

    • Returns the current enabled cursor identifier.

      Returns string | undefined

    • Moves the cursor to an enabled identifier.

      Parameters

      • id: string

      Returns string | undefined

    • Moves the cursor to the first enabled action.

      Returns string | undefined

    • Moves the cursor to the last enabled action.

      Returns string | undefined

    • Moves the cursor to the next enabled action, wrapping at the end.

      Returns string | undefined

    • Moves the cursor one viewport page backward.

      Returns string | undefined

    • Moves the cursor one viewport page forward.

      Returns string | undefined

    • Moves the cursor to the previous enabled action, wrapping at the start.

      Returns string | undefined