I installed the kitchen sink demo from the play store.
In the Form page:
desired behavior: keyboard stays open and you can directly enter a value
I have the same issue trying NativeBase in my App. I also tried putting a RN TextInput into a NativeBase Content and still had the problem. After I replaced Content with View it works as expected.
Placing a NativeBase Input component into the View also worked.
After changing back View to Content the error reappeared.
So it seems to be a problem the Content component.
Hi, just to help us narrow down the possibilities, can you try it inside a RN <ScrollView> and check the result?
When I replace the <Content> with <ScrollView> in my app, nothing gets rendered inside anymore and I get a warning: React.createElement: type should not be null.
Well, this could also be a problem with my app, so the test should probably better be done inside the kitchen sink demo. But unfortunately I don't have the source setup, I just downloaded it from the play store.
But I also found another issue with the keyboard which is not a NativeBase problem but perhaps related.
I changed from react-native-router-flux routing to the react native Navigator. When I now transition from my login page to my main page, the keyboard stays open. Also without using NativeBase. I now have to hide the keyboard per code before changing the route.
So perhaps trying to fix this behavior created the other issue?
It is happening because of the <Content> component which uses <ScrollView>. So basically you need to use <View> tag in place of <Content> and on click of button or transition hide the keyboard manually. If you are using RN V > 0.35 use Keyboard.dismiss() method else use hide keyboard react native npm package.
Use keyboardShouldPersistTaps prop with Content. Will update the KitchenSink app with this change soon.
Most helpful comment
Use
keyboardShouldPersistTapsprop withContent. Will update the KitchenSink app with this change soon.