Issue
How do I show Keyboard for TextInput programmatically using react native? Using a ScrollView, tapping between TextInput causes the keyboard to be dismissed. I want to show the Keyboard again using onFocus method of TextInput. Anyway to accomplish this?
Solution
consider have a reference of your TextInput
:
<TextInput ref={(ref)=>{this.myTextInput = ref}} />
And when you have to focus it again use : this.myTextInput.focus()
edit React16
For react16 use React.createRef
to create a reference.
Answered By - LHIOUI
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.