contentContainerStyle flexGrow: 1 to allow center ListEmptyComponent #517
Replies: 28 comments 6 replies
|
Would like to bump this as it deserve more attention. i have the same use case with yours on ListEmptyComponent, and need to apply |
|
Please, also add the columnWrapperStyle prop When we have two or more columns in our layout |
|
I think issue is more efficient to point the problem, unfortunately |
|
This is a big issue that should be fixed! |
|
i think you could use CellRendererComponent for that |
|
I just encountered the same problem. I want to center my ListEmptyComponent |
|
I also need |
|
+1 I also need this added |
|
+1 |
|
We recently merged Flashlist support to react-native-collapsible-tab-view and ran into a similar isssue: We were using |
|
any updates on this? |
|
any updates on this one? 🙂 |
|
damn! not fixed |
|
F**, I'm facing this issue and the @tomasmozeris does not work anymore in v1.5. |
|
What a complex bug to fix, this may be a blocker to migrate from FlatList to FlashList |
|
Any updates on this? |
|
+1 |
|
+1 A workaround for now is just to conditionally render. |
|
Hope it will be supported soon |
|
+1 |
|
same problem using FlashList 1.5.0 |
|
For those that use nativewind, just add "my-auto" on "contentContainerClassName": or create a CSS class: and add on contentContainerClassName |
|
I was able to overcome this by adding I'm using FlashList v1.7.2. |
|
|
update please |
|
same issue here |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
I have
ListEmptyComponentcomponent, which uses styleflex: 1, justifyContent: 'center'to place it inside center of users viewport.https://snack.expo.dev/7MSfUAke7
My workaround
To allow empty list container take remaining space I had to patch
flash-listandrecyclerlistviewwithflexGrow: 1in these places:https://github.com/Shopify/flash-list/blob/main/src/FlashList.tsx#L327
https://github.com/Flipkart/recyclerlistview/blob/master/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx#L86
As default
<Flatlist />allowscontentContainerStyle={{ flexGrow: 1 }}and solves such problem, consider to supportflexGrowincontentContainerStyle of FlashlistAll reactions