Say that I want to model a table of things. Something like this:
[{:elements [1 2 3]}
{:elements [4 5 6]}]
I want to select elements by :onClick.
Whenever I select an element, all other elements should become deselected.
Also I want to display some info about the selected element in a grandparent.
How would this be best accomplished?
For selecting I just do something like (fn [_] (om/set-state! owner :selected
true)
I have got four levels of om-functions
element-view
row-view
table-view selected-view
root
I could pass a channel from the root, but it feels clunky to pass it through
several levels when it only going to be used in element-view and selected-view.
--
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.