minor fixes

This commit is contained in:
Bryce Covert
2020-08-18 12:53:46 -07:00
parent 44dab34240
commit 2716b6e2ba
3 changed files with 8 additions and 5 deletions

View File

@@ -25,11 +25,14 @@
(str (.-protocol (.-location js/window)) "//" (.-host (.-location js/window)) (.-pathname (.-location js/window))
"?"
(cemerick.url/map->query (->> uri-params
(filter (fn [[k v]] (not-empty v)) )
(filter (fn [[k v]] (and v
(or (not (seqable? v))
(not-empty v)))) )
(map
(fn [[k v]]
(if (string? v)
[k (str "\"" v "\"")])))
[k (str "\"" v "\"")]
[k v])))
(into {} )))))))
(re-frame/reg-fx

View File

@@ -189,7 +189,7 @@
[:tbody.test
(for [i (range 20)]
^{:key i}
[:tr
[:tr
(for [x (range column-count)]
^{:key x}
[:td #_{:col-span column-count}

View File

@@ -62,13 +62,13 @@
(re-frame/reg-event-fx
::received
(fn [{:keys [db]} [_ id data]]
(println @(re-frame/subscribe [::params id]))
{:db (assoc-in db [::data id] data)
:set-uri-params (dissoc @(re-frame/subscribe [::params id]) :client-id)}))
(re-frame/reg-event-db
::dispose
(fn [db [_ id]]
(println "TABLE" (::table-params db) (::table-params (update db ::table-params dissoc id)))
(-> db
(update ::data dissoc id)
(update ::checked dissoc id)
@@ -135,7 +135,7 @@
(fn [{:keys [db]} [_ id]]
{:db (-> db
(assoc-in [::settled-filters id] @(re-frame/subscribe [::filters id]))
(update-in [::table-params id ] dissoc :start))}))
(assoc-in [::table-params id :start] 0))}))
(re-frame/reg-sub
::settled-filters