I have a vector of events in my factory-row.
An event can be selected by clicking on it:
(merge {:onClick #(om/set-state! owner :selected true)}
(when selected {:style {:background
"white"}}))
If it is selected it will display a white background.
This works fine.
Problem is when I delete an item.
1. Select the first item on the row (turns white)
2. Delete the first item on the row (item disappears but the second item turns
white)
(will-mount [_]
(let [delete (om/get-state owner :delete)]
(go (loop []
(let [event (<! delete)]
(om/transact! factory :events
(fn [xs] (vec (remove (partial = event) xs))))
(recur))))))
Why is local-state propagated to the next item in the list?
Thanks
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.