coerces string representations when selecting clients.
This commit is contained in:
@@ -32,6 +32,12 @@
|
|||||||
(fn [db]
|
(fn [db]
|
||||||
(:selected-clients db)))
|
(:selected-clients db)))
|
||||||
|
|
||||||
|
|
||||||
|
(defn coerce-string-version [x]
|
||||||
|
(if (string? x)
|
||||||
|
(js/parseInt x)
|
||||||
|
x))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::selected-clients
|
::selected-clients
|
||||||
:<- [::selected-clients-raw]
|
:<- [::selected-clients-raw]
|
||||||
@@ -53,7 +59,8 @@
|
|||||||
clients
|
clients
|
||||||
|
|
||||||
(sequential? selected-clients)
|
(sequential? selected-clients)
|
||||||
(filter (comp (set selected-clients) :id) clients)
|
(filter (comp (set (map coerce-string-version selected-clients)) coerce-string-version :id)
|
||||||
|
clients)
|
||||||
|
|
||||||
:else
|
:else
|
||||||
nil)))
|
nil)))
|
||||||
|
|||||||
Reference in New Issue
Block a user