We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug TextInput Cursor keep reseting to first position when setState on event of changeText,
To Reproduce
<View style={{ flex: 1, flexDirection: 'column' }}> <TextInput onBlur={() => { console.log('blur'); }} onChangeText={text => { this.setState({ text }); }} value={this.state.text} style={{ flex: 1 }} multiline /> </View>
Expected behavior It should be back to the position where it lay
The text was updated successfully, but these errors were encountered:
I had the same issue. All you have to do is remove value={this.state.text} from your <TextInput /> component. For example:
value={this.state.text}
<TextInput />
<View style={{ flex: 1, flexDirection: 'column' }}> <TextInput onBlur={() => { console.log('blur'); }} onChangeText={text => { this.setState({ text }); }} style={{ flex: 1 }} multiline /> </View>
Sorry, something went wrong.
No branches or pull requests
Describe the bug
TextInput Cursor keep reseting to first position when setState on event of changeText,
To Reproduce
Expected behavior
It should be back to the position where it lay
The text was updated successfully, but these errors were encountered: