Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

propagate native element refs and add focus methods #594

Merged
merged 3 commits into from
Oct 21, 2016

Conversation

sodiumjoe
Copy link
Contributor

@sodiumjoe sodiumjoe commented Oct 21, 2016

PR Checklist

  • Manually tested across supported browsers
    • Chrome
    • Firefox
    • Safari
    • IE11 (Win 7)
    • Edge (Win 10)
  • Unit tests written (common at minimum)
  • PR has one of the semver- labels
  • Two core team engineer approvals
  • [ ] One core team UX approval

Copy link
Contributor

@mute mute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@@ -58,10 +58,15 @@ const TextFieldValidated = createClass({
return TextField.getDefaultProps();
},

focus() {
this.refs.TextField.focus();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a dumb question, but is it ever possible for a consumer to call this function before render has had a chance to make this property available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, because the method is on the instance that's the result of the render.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question, tho

@sodiumjoe sodiumjoe merged commit 1f66ba4 into master Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants