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]
|
(filter (fn [r]
|
||||||
(not= [:key :new?] (keys r)))
|
(not= [:key :new?] (keys r)))
|
||||||
(assoc-in value (into [i] (get-in template [1 :field]))
|
(assoc-in value (into [i] (get-in template [1 :field]))
|
||||||
(update
|
(let [this-value (if (and e (.. e -target))
|
||||||
(if (and e (.. e -target))
|
(.. e -target -value )
|
||||||
(.. e -target -value )
|
e)]
|
||||||
e)
|
(if (map? this-value)
|
||||||
:key
|
(update this-value :key (fnil identity (random-uuid)))
|
||||||
(fnil identity (random-uuid))) ))))
|
this-value)) ))))
|
||||||
(on-change (mapv
|
(on-change (mapv
|
||||||
(fn [v]
|
(fn [v]
|
||||||
(dissoc v :new? :key))
|
(dissoc v :new? :key))
|
||||||
|
|||||||
Reference in New Issue
Block a user