Reference machines
select
interface 3 type 3 function 1
# CreateSelectInput
Type Parameters
V
Members
defaultOpen?optional defaultOpen?: booleandefaultValue?optional defaultValue?: V | nullitemsitems: readonly SelectItem<V>[]
# SelectContext
Type Parameters
V
Members
highlightedIdhighlightedId: string | nullitemsitems: readonly SelectItem<V>[]typeaheadtypeahead: stringBuffer for type-ahead search. The Layer 3 attachment resets this after a short timeout (typically 500 ms) by dispatching TYPEAHEAD.RESET.
valuevalue: V | null
# SelectItem
Type Parameters
V
Members
disabled?readonly optional disabled?: boolean###### Overrides
CollectionItem.disabledidreadonly id: string###### Overrides
CollectionItem.idlabel?readonly optional label?: string###### Overrides
CollectionItem.labelvaluereadonly value: V
# SelectEvent
SelectEvent<V> = { type: "OPEN"; } | { type: "CLOSE"; } | { type: "TOGGLE"; } | { type: "ESCAPE"; } | { id: string; type: "SELECT"; } | { id: string | null; type: "HIGHLIGHT"; } | { direction: NavigateDirection; type: "NAVIGATE"; } | { char: string; type: "TYPEAHEAD"; } | { type: "TYPEAHEAD.RESET"; } | { type: "SET.VALUE"; value: V | null; } | { items: ReadonlyArray<SelectItem<V>>; type: "SET.ITEMS"; }Type Parameters
V
# SelectMachine
SelectMachine<V> = Machine<SelectContext<V>, SelectEvent<V>, SelectState>Type Parameters
V
# SelectState
SelectState = "closed" | "open"# createSelectMachine ( )
createSelectMachine<V>(input): SelectMachine<V>Construct a fresh Select machine.
Type Parameters
V
Parameters
inputCreateSelectInput<V>
Returns
SelectMachine<V>