basic ability to test.

This commit is contained in:
Bryce Covert
2019-05-09 21:12:26 -07:00
parent 753949e063
commit 677a4e3c22
5 changed files with 128 additions and 10 deletions

View File

@@ -99,6 +99,11 @@
(fn [db event]
(stop-form db form))))
(defn triggers-stop-loading [form]
(re-frame/enrich
(fn [db event]
(assoc-in db [::forms form :status] nil))))
(defn save-succeeded [db id]
(-> db
(assoc-in [::forms id :status] nil)
@@ -116,9 +121,7 @@
(.preventDefault e))
(when can-submit
(re-frame/dispatch-sync (vec (conj submit-event params)))))}
[:h1.title.is-2 title]
]
[:h1.title.is-2 title]]
children)))
:raw-field (fn [control]
(let [{:keys [data]} @(re-frame/subscribe [::form id])]
@@ -144,3 +147,4 @@
"disabled")
:class (str @(re-frame/subscribe [::loading-class id])
(when error " animated shake"))} child]))})