I'm trying to set up a comment page in my app and I want to have the comment input field sitting right on top of the keyboard like Facebook, Instagram, Strava and many other apps have. But when the keyboard comes in it has suggestions on the top like so:
I want to disable the suggestions above the keyboard here so that I can put my textinput on top of the keyboard. Is this possible in React-Native?
React-Native: 0.44.0
To detect when keyboard is opened or closed in React Native, we can call Keyboard. addListener to listen to the 'keybvoardDidShow' and 'keyboardDidHide' events to watch for the keyboard showing and hiding respectively.
So after a some more digging I found that if you set the autoCorrect
prop on the TextInput itself to false, it removes the suggestions above the keyboard. No need to go into the native code to try and fix this.
ie: <TextInput autoCorrect={false}/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With