featherbit UI
    Preparing search index...

    Interface TemplateTokenState

    State + handlers returned by useTemplateToken.

    interface TemplateTokenState {
        activeIndex: number;
        close: () => void;
        filtered: Suggestion[];
        insert: (s: Suggestion | undefined, opts?: InsertOptions) => void;
        onKeyDown: (e: KeyboardEvent) => boolean;
        onValueEvent: () => void;
        open: boolean;
        setActiveIndex: (i: number) => void;
    }
    Index
    activeIndex: number
    close: () => void
    filtered: Suggestion[]

    Trigger- and mode-filtered rows, ready to render.

    insert: (s: Suggestion | undefined, opts?: InsertOptions) => void
    onKeyDown: (e: KeyboardEvent) => boolean

    Call from the field's onKeyDown; returns true when handled (caller stops).

    onValueEvent: () => void

    Call from the field's onChange/onSelect/keyup paths to re-detect the token at the caret.

    open: boolean
    setActiveIndex: (i: number) => void