basic ability to test.
This commit is contained in:
@@ -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]))})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user