(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 #{...}}.(header-key? entry-key)True when entry-key is the key of a group header.
True when `entry-key` is the key of a group header.
(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]})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.
(prev-active-idx visible active-idx)Advance active-idx backward, wrapping, skipping disabled items.
Advance active-idx backward, wrapping, skipping disabled items.
(shown-list items query active-idx)What the list shows for the normalized items that match query: :entries, the group
headers and the items in order, each with its key and the text of what it shows, and
:active-id, the id of the active item, or nil for an empty list. The key of an item is
made of its id, and the key of a header of the id of the item it leads.
What the list shows for the normalized `items` that match `query`: `:entries`, the group headers and the items in order, each with its key and the text of what it shows, and `:active-id`, the id of the active item, or nil for an empty list. The key of an item is made of its id, and the key of a header of the id of the item it leads.
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 |