(filter-items items query)Filter items by query string. Each space-separated token must appear in the item's search-str. Returns {:visible [...] :groups #{...}}.
Filter items by query string. Each space-separated token must appear
in the item's search-str. Returns {:visible [...] :groups #{...}}.(next-active-idx visible active-idx)Advance active-idx forward, wrapping, skipping disabled items.
Advance active-idx forward, wrapping, skipping disabled items.
(normalize {:keys [open-present? modal-raw dismissible-raw disabled-raw
no-scrim-raw close-on-scrim-raw close-on-escape-raw label-raw
placeholder-raw empty-text-raw portal-raw]})Canonicalize raw attr strings to a stable model map.
Canonicalize raw attr strings to a stable model map.
(normalize-items items)Takes a JS array of item objects and returns a ClojureScript vector of normalized maps. Each item receives: :id :label :group :value :icon :disabled? :search-str.
Takes a JS array of item objects and returns a ClojureScript vector of normalized maps. Each item receives: :id :label :group :value :icon :disabled? :search-str.
(normalize-str s)Trim and return nil if empty.
Trim and return nil if empty.
(parse-bool-attr s)Returns true if attr string is non-nil and not "false".
Returns true if attr string is non-nil and not "false".
(parse-bool-default-true s)nil → true, "false" → false, anything else → true.
nil → true, "false" → false, anything else → true.
(prev-active-idx visible active-idx)Advance active-idx backward, wrapping, skipping disabled items.
Advance active-idx backward, wrapping, skipping disabled items.
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 |