mirror of
https://github.com/status-im/re-frame-10x.git
synced 2025-02-19 17:34:20 +00:00
Enable case insensitive filtering
This commit is contained in:
parent
5dce696e29
commit
a9000d2c27
@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
(defn search-input [{:keys [title on-save on-stop]}]
|
(defn search-input [{:keys [title on-save on-stop]}]
|
||||||
(let [val (r/atom title)
|
(let [val (r/atom title)
|
||||||
save #(let [v (-> @val str clojure.string/trim)]
|
save #(let [v (-> @val str str/trim)]
|
||||||
(on-save v))]
|
(on-save v))]
|
||||||
(fn []
|
(fn []
|
||||||
[:input {:type "text"
|
[:input {:type "text"
|
||||||
@ -139,7 +139,7 @@
|
|||||||
(let [slower-than-ms-int (js/parseInt @slower-than-ms)
|
(let [slower-than-ms-int (js/parseInt @slower-than-ms)
|
||||||
slower-than-bold-int (js/parseInt @slower-than-bold)
|
slower-than-bold-int (js/parseInt @slower-than-bold)
|
||||||
op-filter (when-not (str/blank? @filter-items)
|
op-filter (when-not (str/blank? @filter-items)
|
||||||
(filter #(str/includes? (str (:operation %) " " (:op-type %)) @filter-items)))
|
(filter #(str/includes? (str/lower-case (str (:operation %) " " (:op-type %))) @filter-items)))
|
||||||
ms-filter (when-not (str/blank? @slower-than-ms)
|
ms-filter (when-not (str/blank? @slower-than-ms)
|
||||||
(filter #(< slower-than-ms-int (:duration %))))
|
(filter #(< slower-than-ms-int (:duration %))))
|
||||||
transducers (apply comp (remove nil? [ms-filter op-filter]))
|
transducers (apply comp (remove nil? [ms-filter op-filter]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user