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

Can't get ref on <input> if it's a child of <Input> #1536

Closed
darkadept opened this issue Mar 31, 2017 · 1 comment
Closed

Can't get ref on <input> if it's a child of <Input> #1536

darkadept opened this issue Mar 31, 2017 · 1 comment
Assignees
Labels

Comments

@darkadept
Copy link

Can't get React ref on <input> if it's a child of <Input>.

Steps

<Input>
  <input type="text" ref={r => console.log(r)}/>
</Input>

Expected Result

I would expect to see this following in the console, indicating that r is the ref to the <input> tag.

<input type="text">

Actual Result

The ref function is never called. There is no console.log output at all.

Version

0.67.2

Testcase

http://codepen.io/darkadept/pen/mWazWa

@layershifter
Copy link
Member

It happens because we handle ref even Input has child input, so we overriding existing ref without handling it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants