(active-filters->facet-query filters)
To create the map that becomes the query strings we pass to our endpoint, we
simply have to prepend facet_
to the keys of our active filter map and turn
the values into strings.
To create the map that becomes the query strings we pass to our endpoint, we simply have to prepend `facet_` to the keys of our active filter map and turn the values into strings.
(circular-index-finder direction result-index results-count)
Returns the index of a result item, such that going down at the bottom loops to the top and vice versa. Element -1 is 'show all'
Returns the index of a result item, such that going down at the bottom loops to the top and vice versa. Element -1 is 'show all'
(endless-scroll-handler _e)
Load more results when the user has scrolled far enough down the page. Use rateLimit to only dispatch the event once for an interval.
Load more results when the user has scrolled far enough down the page. Use rateLimit to only dispatch the event once for an interval.
(merge-filtered-facets filters old-facets facets & {:keys [fresh]})
Sometimes we want to update our facets based on the currently active filter.
When activating a filter, we want to keep our old facet for that filter, but
update the other ones. This is achieved by calling this function normally.
If we perform a new search with a filter active, we want to replace our old
filtered facet, but keep the other ones. Specify the :fresh
key for this.
Sometimes we want to update our facets based on the currently active filter. When activating a filter, we want to keep our old facet for that filter, but update the other ones. This is achieved by calling this function normally. If we perform a new search with a filter active, we want to replace our old filtered facet, but keep the other ones. Specify the `:fresh` key for this.
The amount of results we should fetch at a time.
The amount of results we should fetch at a time.
(scrolled-past?)
Whether the user has scrolled past the point where we want to load more.
Whether the user has scrolled past the point where we want to load more.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close