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