I'm trying both approaches right now and for some reason nothing is happening.
My parent looks approx like this:
(defn widget-selection-menu
[app owner]
(reify
om/IInitState
(init-state
[_]
{:selection-menu-visible false})
om/IRenderState
(render-state [_ {:keys [selection-menu-visible]}]
....
(when selection-menu-visible
(om/build
widget-selection-menu-expanded
app {:state
{:parent owner
:cb #(om/set-state! owner :selection-menu-visible false)}}))
I am passing in both the parent directly as well as a callback to try out both.
The child looks like this:
(defn widget-selection-menu-expanded
[app owner]
(reify
om/IRenderState
(render-state [_ {:keys [parent cb]}]
....
Then, in an :onClick in this child, I have tried these:
#(cb) and
#(om/set-state! parent :selection-menu-visible false)
There are no errors that result, but I would expect the parent to receive
"false" and thus the child would not get built via om/build.
Is there something obvious I am forgetting to do?
--
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.