implementing sorting for checks.
This commit is contained in:
@@ -61,14 +61,11 @@
|
||||
|
||||
(defn change-handler [form customize-fn]
|
||||
(fn [db [_ & path-pairs]]
|
||||
(println "CHA" form path-pairs)
|
||||
(reduce
|
||||
(fn [db [path value]]
|
||||
(println "PATH" path "VALUE" value)
|
||||
(let [updated (assoc-in db (into [::forms form :data] path) value)]
|
||||
(reduce
|
||||
(fn [updated [path value ]]
|
||||
(println "custom PATH" path "custom VALUE" value)
|
||||
(assoc-in updated (into [::forms form :data] path) value))
|
||||
updated
|
||||
(partition 2 (customize-fn (get-in updated [::forms form :data]) path value)))))
|
||||
@@ -118,7 +115,7 @@
|
||||
(.stopPropagation e)
|
||||
(.preventDefault e))
|
||||
(when can-submit
|
||||
(re-frame/dispatch-sync (conj submit-event params))))}
|
||||
(re-frame/dispatch-sync (vec (conj submit-event params)))))}
|
||||
[:h1.title.is-2 title]
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user