you might have to resort to .getElementById or .getElementsByTagName to
select the child ad then call .focus on it,

I think there should also be a way to get the children from
reagent/current-component

but that is uncomfortable to me as you're manipulating the DOM elements
directly

I tried "autoFocus" attribute with plain React and it works fine upon
mount, but when I specified the attribute in Reagent it did nothing.

On Thu, Apr 23, 2015 at 11:19 AM, Jamie Orchard-Hays <[email protected]>
wrote:

> The classic example uses:
>
> :component-did-update #(when @editing? (.focus (reagent/dom-node %)))
>
> This works fine if the :input element is the root doc of the component.
>
> If I'm wrapping it, in say a :span tag, how do I access the :input, now
> that it is a child rather than root.
>
> Cheers,
>
> Jamie
>
> --
> 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.
>

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