(filter-options options query selected-set)Filters options by case-insensitive substring match on label, excludes already-selected values, and caps at max-rendered-options.
Filters options by case-insensitive substring match on label, excludes already-selected values, and caps at max-rendered-options.
(find-option-by-value options value)Returns the first option map where :value matches, or nil.
Returns the first option map where :value matches, or nil.
(highlight-match label query)Splits label around the first case-insensitive match of query. Returns {:before :match :after} or nil if no match.
Splits label around the first case-insensitive match of query.
Returns {:before :match :after} or nil if no match.(max-reached? value-set max-val)Returns true when a max is set and the value set has reached it.
Returns true when a max is set and the value set has reached it.
(next-active-idx n active-idx)Advance active-idx forward, wrapping.
Advance active-idx forward, wrapping.
(normalize {:keys [value-raw placeholder-raw name-raw disabled-present?
required-present? open-present? placement-raw max-raw]})Derives a complete view-model from raw attribute presence/values.
Derives a complete view-model from raw attribute presence/values.
(normalize-placement s)Normalizes raw placement string. Falls back to default-placement if invalid.
Normalizes raw placement string. Falls back to default-placement if invalid.
(parse-max s)Parses max attribute to a positive integer, or nil if absent/invalid.
Parses max attribute to a positive integer, or nil if absent/invalid.
(parse-value s)Parses a comma-separated value string into a set of trimmed, non-empty strings. nil or empty string yields #{}.
Parses a comma-separated value string into a set of trimmed, non-empty strings.
nil or empty string yields #{}.(prev-active-idx n active-idx)Advance active-idx backward, wrapping.
Advance active-idx backward, wrapping.
(serialize-value value-set)Serializes a set of values into a sorted, comma-separated string. Empty set yields empty string.
Serializes a set of values into a sorted, comma-separated string. Empty set yields empty string.
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 |