single event for handling changes.
This commit is contained in:
@@ -107,11 +107,18 @@
|
||||
|
||||
]
|
||||
children)))
|
||||
:raw-field (fn [control]
|
||||
(let [{:keys [data]} @(re-frame/subscribe [::form id])]
|
||||
[bind-field (-> control
|
||||
(assoc-in [1 :subscription] data)
|
||||
(assoc-in [1 :event] change-event))]))
|
||||
:field (fn [label control]
|
||||
(let [{:keys [data]} @(re-frame/subscribe [::form id])]
|
||||
[:div.field
|
||||
(when label [:p.help label])
|
||||
[:div.control [bind-field (assoc-in control [1 :subscription] data)]]]))
|
||||
[:div.control [bind-field (-> control
|
||||
(assoc-in [1 :subscription] data)
|
||||
(assoc-in [1 :event] change-event))]]]))
|
||||
|
||||
:error-notification (fn []
|
||||
(when-let [error (:error @(re-frame/subscribe [::form id]))]
|
||||
|
||||
Reference in New Issue
Block a user