tons of bug fixes

This commit is contained in:
Bryce Covert
2020-07-08 21:44:11 -07:00
parent 86f51f93e4
commit d120b7e810
18 changed files with 442 additions and 156 deletions

View File

@@ -143,7 +143,7 @@
(defn vertical-form [{:keys [can-submit id change-event submit-event ]}]
{:form ^{:key "form"}
{:form
(fn [{:keys [title] :as params} & children]
(let [{:keys [data active? error]} @(re-frame/subscribe [::form id])
can-submit @(re-frame/subscribe can-submit)]
@@ -157,6 +157,20 @@
[:h1.title.is-2 title]
[:<>
children]]))
:form-inline
(fn [{:keys [title] :as params} children]
(let [{:keys [data active? error]} @(re-frame/subscribe [::form id])
can-submit @(re-frame/subscribe can-submit)]
[:form { :on-submit (fn [e]
(when (.-stopPropagation e)
(.stopPropagation e)
(.preventDefault e))
(when can-submit
(re-frame/dispatch-sync (vec (conj submit-event params)))))}
[:h1.title.is-2 title]
children]))
:raw-field (fn [control]
(let [{:keys [data]} @(re-frame/subscribe [::form id])]
[bind-field (-> control