Reputation: 21
I want to focus in TextInput and make the keyboard pop up by pressing a button.But it didn't work. So how to solve it? Here is my code.
<TextInput ref="myInput" />
<Text onPress={()=> this.refs["myInput"].focus()>custom</Text>
Upvotes: 0
Views: 4570
Reputation: 6223
replace this line:
<Text onPress={()=> { this.refs.myInput.focus();} }>custom</Text>
You have not closed }
brace and syntax issue
Upvotes: 3