Closed JJablonski02 closed 1 week ago
@JJablonski02 the possible solution in your case is to wrap children of KeyboardAwareScrollView
inside additional View
and specify minHeight
. In this case autoshrinking will be fixed.
The problem why it happens is because I embed an additional View
inside KeyboardAwareScrollView
(and I increase size of this view when keyboard is shown - it's necessary to give an ability to scroll to the bottom when keyboard is shown). And when I increase the size of this view - the available space becomes smaller and your views gets shrinked.
The issue you are referring to was described in https://github.com/kirillzyusko/react-native-keyboard-controller/issues/168
I wish contentInset
property of ScrollView would exist on Android - in this I could have a cross-platform code that wouldn't have breaking changes comparing to original implementation of KeyboardAwareScrollView
π
Thank you @kirillzyusko. It worked as I expected :)
Awesome @JJablonski02 π
I'm going to close that issue then. I wish my implementation wouldn't have a breaking changes, but contentInset
on Android is a blocker here at the moment π
Describe the bug Surrounding the view with a component KeyboardAwareScrollView it shrinks the view. It works correct when I set hardcoded children components height props, but when children are flexbox containers it doesnt work properly. In some cases we want to shrink view, but in some cases we do not.
Code snippet