Open alexisdelage opened 1 year ago
On the FormScrollView component, when passing custom styles to the prop contentContainerStyle as an array, the property paddingBottom is override to 0 on Android.
FormScrollView
contentContainerStyle
paddingBottom
<KeyboardAwareScrollView enableOnAndroid contentContainerStyle={[ { flexGrow: 1 }, { paddingBottom: 75 }, ]} />
Result: The paddingBottom is applied on iOS but not on Android.
The paddingBottom property is override at this line in the code: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/9eee405f7b3e261faf86a0fc8e495288d91c853e/lib/KeyboardAwareHOC.js#L531 It checks if a paddingBottom property is present on the contentContainerStyle object before setting it zero, but it does not handle the case where contentContainerStyle is an array (which can be the case according to the type of StyleProp<ViewStyle> of React Native
StyleProp<ViewStyle>
Same for me
@slorber My be you check this?
I am not maintaining this library and haven't used RN recently
Description
On the
FormScrollView
component, when passing custom styles to the propcontentContainerStyle
as an array, the propertypaddingBottom
is override to 0 on Android.Exemple
Result: The
paddingBottom
is applied on iOS but not on Android.Possible cause
The
paddingBottom
property is override at this line in the code: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/9eee405f7b3e261faf86a0fc8e495288d91c853e/lib/KeyboardAwareHOC.js#L531 It checks if apaddingBottom
property is present on thecontentContainerStyle
object before setting it zero, but it does not handle the case wherecontentContainerStyle
is an array (which can be the case according to the type ofStyleProp<ViewStyle>
of React Native