Shopify / flash-list

A better list for React Native
https://shopify.github.io/flash-list/
MIT License
5.33k stars 275 forks source link

ListEmptyComponent not centered #858

Open VictorioMolina opened 1 year ago

VictorioMolina commented 1 year ago

Current behavior

Before migrating to FlashList, applying flexGrow: 1 to FlatList's contentContainerStyle did the trick.

Expected behavior

ListEmptyComponent should be centered.

To Reproduce

Check this snack

Platform:

Environment

1.3.1

VictorioMolina commented 1 year ago

https://github.com/Shopify/flash-list/discussions/517

ursnj commented 6 months ago

Any luck here ???

KallumParr commented 1 month ago

Hey there, spent some time solving this our side and found that creating a view around FlashList, measuring the height of the view, then passing in the resulting height to ListEmptyComponent via a renderProp did the trick.