Content enableOnAndroid is not working when container has flex set to 1
See original GitHub issueI have gone through these following points
- Check latest documentation: https://docs.nativebase.io/
- Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
- [] Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
- Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-KitchenSink
- [] For discussion purpose make use of NativeBase Slack: http://slack.nativebase.io/
- [] For queries related to theme, check Theme Variables from Docs and live NativeBase Theme Editor http://nativebase.io/customizer/
Issue Description
node, npm, react-native, react and native-base version, expo version if used, xcode version
- node 12.13.1
- npm 6.12.1
- expo 3.11.1
- native-base ^2.13.8
- react native ~0.61.4
Expected behaviour
The TextInput filed should be visible when user is trying to enter some data in text field. (keyboardAvoidView functionality should work)
Actual behaviour
The inputs fileds were hidden when the keyboard pops in.
Steps to reproduce
Snack link to reproduce the issue
Is the bug present in both iOS and Android or in any one of them?
I have checked only on Android
Any other additional info which would help us debug the issue quicker.
When i have removed flex:1
styling from the content this is working as expected.
###Important
If you want your issue to be looked at quicker, attach a snack reproducible with your issue. Makes it easier for us!
Snack link to reproduce the issue
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
react-native-keyboard-aware-scroll-view not working properly
What worked for me was ensuring enableOnAndroid = true and setting a marginBottom inside the keyboardAwareScrollView. <KeyboardAwareScrollView ...
Read more >flex - CSS: Cascading Style Sheets - MDN Web Docs
The flex CSS shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container....
Read more >Taming React Native's ScrollView with flex | by Peter Piekarczyk
It will apply styles to the content container as if there were a View ... is why setting flex: 1 didn't work the...
Read more >`flex-grow` is weird. Or is it? - CSS-Tricks
I thought that all flex items with flex-grow set to 1 would have an ... As it turns out, the problem wasn't the...
Read more >How to use react-native-keyboard-aware-scroll-view - Tabnine
viewStyle} contentContainerStyle={styles. ... render() { return ( <KeyboardAwareScrollView style={{ flex: 1, ... flexGrow} enableOnAndroid={true}.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is how I solved my issue i.e, a temporary workaround
@hanykumar Thanks for the support, Let me know if have any other solutions to solve this in a better way (apart from using additional libraries)
I don’t want to incur additional libraries, as I am having this issue at one place.