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

    Interface ListData<TItem>

    Stateful data accepted by the Blessed list adapter.

    interface ListData<TItem extends ListItem = ListItem> {
        activeId?: string;
        characters?: ListCharacters;
        defaultValue?: string;
        emptyText?: string;
        items: readonly TItem[];
        onActiveIdChange?: (activeId: string) => void;
        onValueChange?: (value: string) => void;
        value?: string;
    }

    Type Parameters

    • TItem extends ListItem = ListItem

      List item shape, including application metadata.

    Index

    Properties

    activeId?: string

    Preferred initial cursor identifier.

    characters?: ListCharacters

    Character tokens used by the pure renderer.

    defaultValue?: string

    Initial selection for uncontrolled usage.

    Ignored when value is supplied.

    emptyText?: string

    Text displayed when no items exist.

    items: readonly TItem[]

    Ordered items. Disabled items are visible but not interactive.

    onActiveIdChange?: (activeId: string) => void

    Called after the cursor moves to a different enabled item.

    onValueChange?: (value: string) => void

    Called when Enter or ListHandle.selectActive requests selection.

    value?: string

    Controlled selected identifier.

    When supplied, selection requests emit onValueChange but visual state changes only after new data is passed to setData.