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
Hello,
I'm using <TextInput> component in my app with onChangeText event and I'm setting value attribute to this.state.inputText which I update myself in callback.
However, sometimes I try not to update the text, i.e. I'll not update the state and hence the text SHOULD NOT appear in the TextInput. But I see the text updated inside input field for a fraction of second and then it goes back to original.
Ex -
ABC______________ <-- textinput
My onChangeText={this.doSomething} function:
Now when I enter D above, 'D' will appear in the input field for a fraction of second whereas ideally it should not. Why is onChangeText firing after the text has already been displayed inside TextInput?
--- Delete everything above this line ---
Additional Information
React Native version: 0.43
Platform: Android
Development Operating System: Windows
Dev tools: Not really
The text was updated successfully, but these errors were encountered:
It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.
I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!
Hello,
I'm using
<TextInput>
component in my app with onChangeText event and I'm setting value attribute tothis.state.inputText
which I update myself in callback.However, sometimes I try not to update the text, i.e. I'll not update the state and hence the text SHOULD NOT appear in the TextInput. But I see the text updated inside input field for a fraction of second and then it goes back to original.
Ex -
ABC______________ <-- textinput
My onChangeText={this.doSomething} function:
doSomething(text) {
if(text == 'ABCD') return;
this.setState({inputText: text});
}
Now when I enter D above, 'D' will appear in the input field for a fraction of second whereas ideally it should not. Why is onChangeText firing after the text has already been displayed inside TextInput?
--- Delete everything above this line ---
Additional Information
The text was updated successfully, but these errors were encountered: