Combobox (typeahead): a text input that asks the server for options as the
user types, and a hidden input holding the chosen value. For a choice among
more rows than a select can carry. With :multiple, each value chosen is a
chip holding its own hidden input. The keyboard and picking behaviour is
the combobox Alpine component in ui-style's components.js.
Combobox (typeahead): a text input that asks the server for options as the user types, and a hidden input holding the chosen value. For a choice among more rows than a select can carry. With `:multiple`, each value chosen is a chip holding its own hidden input. The keyboard and picking behaviour is the `combobox` Alpine component in ui-style's components.js.
(combobox field-key
{:keys [url value label multiple chosen remove-label placeholder
required readonly attrs value-attrs]
submitted-as :name})A combobox submitted as field-key.
opts:
:url where the options come from; answered with options
:name what the value is submitted as; field-key by default
:value the chosen value, submitted
:label what the chosen value is shown as
:multiple choose several: :chosen [[value label] ...] are chips,
and each option picked adds one; the form submits the
value once per chip
:remove-label the accessible name of a chip's remove button
:placeholder, :required, :readonly
:attrs extra attributes for the text input
:value-attrs extra attributes for the hidden input, which fires change
when an option is picked
A combobox submitted as `field-key`.
opts:
:url where the options come from; answered with `options`
:name what the value is submitted as; `field-key` by default
:value the chosen value, submitted
:label what the chosen value is shown as
:multiple choose several: `:chosen` [[value label] ...] are chips,
and each option picked adds one; the form submits the
value once per chip
:remove-label the accessible name of a chip's remove button
:placeholder, :required, :readonly
:attrs extra attributes for the text input
:value-attrs extra attributes for the hidden input, which fires `change`
when an option is pickedThe most options an options endpoint answers one query with.
The most options an options endpoint answers one query with.
(options field-key items empty)The options of the combobox for field-key, as its endpoint answers them:
items [[value label] ...], or empty when there are none.
The options of the combobox for `field-key`, as its endpoint answers them: `items` [[value label] ...], or `empty` when there are none.
(query request)The text typed into a combobox, from its options request, or nil.
The text typed into a combobox, from its options request, or nil.
The query parameter the typed text is sent as.
The query parameter the typed text is sent as.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |