Disable sorting if query contains and there is no default sorting

- Also fixed caret not showing up when sorting occurs by default for
  a default sorting state coming from :query-sort-by and
  :query-sort-desc
- Also cleaned up sort state. Rum local state doesn't seem necessary
This commit is contained in:
Gabriel Horner
2022-09-19 16:52:14 -04:00
parent 91d6d14720
commit 60067cb817
2 changed files with 69 additions and 43 deletions

View File

@@ -577,6 +577,10 @@ Some bindings in this fn:
(when sort-by
{:transform-fn sort-by})))))))
(defn query-contains-filter?
[query filter-name]
(string/includes? query (str "(" filter-name)))
(comment
;; {{query (and (page-property foo bar) [[hello]])}}