coerces string representations when selecting clients.

This commit is contained in:
2023-09-05 11:20:56 -07:00
parent 7268f026ec
commit 46ef741cf2

View File

@@ -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)))