Trevixal API
    Preparing search index...

    Interface SuggestionListOptions<T>

    interface SuggestionListOptions<T> {
        allowSpaces?: boolean;
        char: string;
        items: (query: string) => readonly T[] | Promise<readonly T[]>;
        onSelect: (item: T, match: TriggerMatch) => void;
        onState: (state: SuggestionListState<T> | null) => void;
        startOfBlock?: boolean;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    allowSpaces?: boolean

    Allow whitespace inside the query (multi-word item names).

    char: string

    The trigger sequence, e.g. '@', '/', ':'.

    items: (query: string) => readonly T[] | Promise<readonly T[]>

    Items for a query; async providers are raced (stale results dropped).

    onSelect: (item: T, match: TriggerMatch) => void

    An item was chosen (Enter/Tab, or programmatically via select).

    onState: (state: SuggestionListState<T> | null) => void

    Render hook: the current popup state, or null when closed.

    startOfBlock?: boolean

    Only match when the trigger sits at the very start of the block.