fixing gnarly usage of multi. Better approach is to always have innenr state.

This commit is contained in:
2022-05-16 21:00:00 -07:00
parent 88ba64f60f
commit d24f7a81a2

View File

@@ -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))