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

    Interface MenuData<TItem>

    Stateful data accepted by the Blessed menu adapter.

    interface MenuData<TItem extends MenuItem = MenuItem> {
        activeId?: string;
        characters?: MenuCharacters;
        emptyText?: string;
        items: readonly TItem[];
        onAction?: (item: TItem) => void;
        onActiveIdChange?: (activeId: string) => void;
        shortcutSeparator?: string;
    }

    Type Parameters

    Index

    Properties

    activeId?: string

    Preferred initial cursor identifier.

    characters?: MenuCharacters

    Character tokens used by the pure renderer.

    emptyText?: string

    Text displayed when no actions exist.

    items: readonly TItem[]

    Ordered actions. Disabled actions are visible but not interactive.

    onAction?: (item: TItem) => void

    Called when Enter, Space, or MenuHandle.activateActive requests activation.

    onActiveIdChange?: (activeId: string) => void

    Called after the cursor moves to a different enabled action.

    shortcutSeparator?: string

    Text inserted between a label and shortcut.