-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
React Input component crashes when inputRef is used #310
Comments
Thanks for creating this issue. Are you currently running into this problem? Can you provide an example snippet? |
You should see an error in the console to the effect of https://codesandbox.io/s/quirky-wilbur-je6eg |
@amorey, @download13: I encountered this issue as well. Proposed solution in #315 |
Have you tried using the |
Thanks @amorey: that works as well but could we then add |
Sure, though I'm not familiar with typescript. Can you submit a PR or show me how to add it? |
Hi @amorey: sorry for the delayed response. I'll try to add it. |
Added PR to DefinitelyTyped: DefinitelyTyped/DefinitelyTyped#43079 |
Awesome! Thanks! Let me know when it gets merged and then we'll close this issue. |
If you use an Input element with inputRef, it clobbers the inputRef passed here resulting in an error being thrown here because
this.controlEl
is undefined.I think there might be a workaround here: facebook/react#13029
The text was updated successfully, but these errors were encountered: