Reputation: 41
The below given code is working on first time and on second time click on same text input it is not working ( keyboard opening again ). Because the text input is already focused and i am using custom number buttons for input.
TextInput onFocus={Keyboard.dismiss()}
Any suggestions? Problem in react native.
Upvotes: 2
Views: 5747
Reputation: 828
<TextInput showSoftInputOnFocus={false}/>
Use showSoftInputOnFocus. reference
Upvotes: 2
Reputation: 793
use can use onKeyPress event, which gets called on every keypress on the textinput
https://facebook.github.io/react-native/docs/textinput#onkeypress
<TextInput onKeyPress={Keyboard.dismiss()}/>
Upvotes: 0