I have come across a similar frustration before.  My workaround might not
help in this situation but I'll share it anyway.

It's often helpful to have access to a HTML element based on the :ref
property.  Unfortunately this isn't possible from a parent/child
component.  For this reason I created select-template and input-template.
They allowed me to reuse the base select/input functionality but also use
:ref in the new components I created

https://bitbucket.org/condense/om-tick/src/e7ff3c1a84797642cbbda216e194686fb519b37f/src/om_tick/bootstrap.cljs?at=master#cl-54

Not pretty but it has served the purpose.



On Sat, Apr 4, 2015 at 9:41 PM, Oliver George <[email protected]>
wrote:

> I have been thinking about that too and it's not anything i've read about
> directly.  Perhaps a weakness in React.
>
> It seems like something you could use a channel or callback for passed as
> a property.
>
> Let's do something simple and practical now but keep our eyes open for
> examples of other approaches.
> On 4 Apr 2015 21:21, "Ruslan Prokopchuk" <[email protected]> wrote:
>
>> I want to make Om Popup component based on Closure Popup [1], which takes
>> two results of `om/build` (let name it `anchor` and `popup`) and wraps them
>> to add popup functionality to `popup`, anchoring its position to `anchor`.
>> But in my component I need to get `anchor` and `popup` DOM elements to read
>> actual width of `anchor` and to pass `popup` node in goog.ui.Popup. Now I
>> use `(om/get-node (.. anchor -props -children -owner)`, but it seems to be
>> too deep in guts and unreliable (especially when component is additionally
>> wrapped using :instrument).
>>
>> So, my question is: does any reliable way to get component owner from
>> component exist? Or, may be, does any better architecture for implementing
>> popup in Om exist?
>>
>> [1]
>> http://docs.closure-library.googlecode.com/git/class_goog_ui_Popup.html
>>
>> --
>> 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.
>>
>


-- 
Oliver George
Director, Condense
0428 740 978

-- 
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.

Reply via email to