fixing gnarly usage of multi. Better approach is to always have innenr state.
This commit is contained in:
@@ -175,12 +175,12 @@
|
||||
(filter (fn [r]
|
||||
(not= [:key :new?] (keys r)))
|
||||
(assoc-in value (into [i] (get-in template [1 :field]))
|
||||
(update
|
||||
(if (and e (.. e -target))
|
||||
(.. e -target -value )
|
||||
e)
|
||||
:key
|
||||
(fnil identity (random-uuid))) ))))
|
||||
(let [this-value (if (and e (.. e -target))
|
||||
(.. e -target -value )
|
||||
e)]
|
||||
(if (map? this-value)
|
||||
(update this-value :key (fnil identity (random-uuid)))
|
||||
this-value)) ))))
|
||||
(on-change (mapv
|
||||
(fn [v]
|
||||
(dissoc v :new? :key))
|
||||
|
||||
Reference in New Issue
Block a user