You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
I used the ref callback in my code, I want to implement clicking a input and got that focused.
My main code was the belows.
But in the handleFocus, the this.replaceInput is not the actural one, I could not invoke this.replaceInput.focus() or this.replaceInput.current.focus() or this.replaceInput.input.focus() .
What is the current behavior?
I used the ref callback in my code, I want to implement clicking a input and got that focused.
My main code was the belows.
But in the handleFocus, the
this.replaceInput
is not the actural one, I could not invokethis.replaceInput.focus()
orthis.replaceInput.current.focus()
orthis.replaceInput.input.focus()
.The full code is here.
I have read #8359 and https://reactjs.org/docs/refs-and-the-dom.html#callback-refs but still could not make it works as expected.
The text was updated successfully, but these errors were encountered: