(filter-items items query filter-mode)The items that match query in filter-mode. In the default mode, each word of the query
must appear in the search text of an item. In the mode none, every item matches.
The items that match `query` in `filter-mode`. In the default mode, each word of the query must appear in the search text of an item. In the mode `none`, every item matches.
(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 filter-raw]})Canonicalize raw attr strings to a stable model map.
Canonicalize raw attr strings to a stable model map.
(normalize-filter raw)The filter mode for a raw filter attribute. An unknown value gives the default.
The filter mode for a raw `filter` attribute. An unknown value gives the default.
(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 {:keys [query active-idx filter-mode]})What the list shows for the normalized items that match :query in :filter-mode:
: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` in `:filter-mode`: `: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 |