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

    Interface SelectData<TItem>

    Stateful data accepted by the Blessed select adapter.

    interface SelectData<TItem extends SelectItem = SelectItem> {
        activeId?: string;
        characters?: SelectCharacters;
        defaultValue?: string;
        emptyText?: string;
        items: readonly TItem[];
        onOpenChange?: (open: boolean) => void;
        onActiveIdChange?: (activeId: string) => void;
        onValueChange?: (value: string) => void;
        open?: boolean;
        placeholder?: string;
        value?: string;
    }

    Type Parameters

    Index

    Properties

    activeId?: string

    Preferred initial cursor identifier.

    characters?: SelectCharacters

    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 options exist.

    items: readonly TItem[]

    Ordered options. Disabled options are visible but not interactive.

    onOpenChange?: (open: boolean) => void

    Called after the open state changes.

    onActiveIdChange?: (activeId: string) => void

    Called after the cursor moves to a different enabled option.

    onValueChange?: (value: string) => void

    Called when selection changes or a controlled selection is requested.

    open?: boolean

    Controlled open state.

    placeholder?: string

    Text shown when no value is selected.

    value?: string

    Controlled selected option identifier.