Hi Greg,

Wanting to achieve the same affect (focus immediately on display) I implemented 
your gist's approach recently. Unfortunately, even with a React `:key` added to 
the input, the explicit focus would still be lost on the set-state rerender. 
Not sure if related to different React.js and Om versions (I'm on 0.11.1 and 
0.7.1 respectively). 

Rather than further hacking to retrigger the focus on the new render, I looked 
around for something cleaner and discovered that an "autoFocus" attribute has 
been supported since React.js 0.9. RC1.

This worked perfectly for me and removed the need for mutating the dom or 
accessing a ref by om/get-node.

Just thought I'd let you know about "autoFocus" since it sounded like you were 
also looking for something simpler :)

C

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