treeloom-components
    Preparing search index...

    Type Alias TypeaheadParts

    What one typeahead's listeners share: its parts, its choices and what has been picked so far.

    type TypeaheadParts = {
        emptyOption: DomItem;
        freeTypeInput: DomItem;
        optionItems: DomItem[];
        options: TypeaheadOption[];
        selectItem: DomItem;
        state: { committed: string; pointerInList: boolean; usingKeys: boolean };
        wrapper: DomItem;
    }
    Index
    emptyOption: DomItem

    The hidden, empty first option: selected while nothing is picked, so an untouched typeahead submits ''.

    freeTypeInput: DomItem
    optionItems: DomItem[]

    The option items the visitor can filter to (not the empty "nothing picked" option).

    options: TypeaheadOption[]
    selectItem: DomItem
    state: { committed: string; pointerInList: boolean; usingKeys: boolean }

    Type Declaration

    • committed: string

      The value of the last option actually picked ('' for none): what the form submits.

    • pointerInList: boolean

      A pointer went down on the list and has not clicked yet (Safari does not focus a clicked select).

    • usingKeys: boolean

      The last input on the list was a key (arrows move the highlight, so their change events pick nothing).

    wrapper: DomItem