tons of bug fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user