Skip to content

[BUG] paddingBottom styling property is forced to zero on Android #568

Open
@alexisdelage

Description

@alexisdelage

Description

On the FormScrollView component, when passing custom styles to the prop contentContainerStyle as an array, the property paddingBottom is override to 0 on Android.

Exemple

 <KeyboardAwareScrollView
      enableOnAndroid
      contentContainerStyle={[
        { flexGrow: 1 },
        { paddingBottom: 75 },
      ]}
    />

Result: The paddingBottom is applied on iOS but not on Android.

Possible cause

The paddingBottom property is override at this line in the code:

((contentContainerStyle || {}).paddingBottom || 0) +

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions