React-native: [ListView] Padding at the bottom of list view doesn't work

Created on 1 Apr 2015  路  9Comments  路  Source: facebook/react-native

Adding paddingBottom to a list view doesn't seem to actually adding padding to the bottom. Other padding values work fine.

Locked

Most helpful comment

@christopherdro The solution works, but this bug should be fixed properly in the ListView. So please reopen this issue.

All 9 comments

This seems to be an issue with ScrollView also.

+1 - Looks like I'll just use renderFooter instead.

@vjeux @a2 Do you have any tips on how to fix this? I couldn't figure out the issue after spending a few hours on it. RCT_EXPORT_SHADOW_PROPERTY and RCT_PADDING_PROPERTY seem to be set properly for paddingBottom, and (UIEdgeInsets)paddingAsInsets is being called with the correct padding values.

In the meantime, setting paddingBottom for the contentContainerStyle prop works for ListViews and ScrollViews.

In some of the UIExplorer examples, we've added a blank <View /> with a specific height to the bottom of the <ScrollView />. Does that work for you?

Adding a blank <View/>, setting paddingBottom for contentContainerStyle, and using renderFooter all work, but I was hoping for advice on how to fix the paddingBottom style property at the API level (e.g. make it so that paddingBottom effects the layout correctly rather than being a no-op).

@cleercode Did any of the above solutions end up working out for you?

Closing this since no one has responded for a while.

@christopherdro The solution works, but this bug should be fixed properly in the ListView. So please reopen this issue.

This issue also affects FlatList ;(

Was this page helpful?
0 / 5 - 0 ratings