contentContainerStyle flexGrow: 1 to allow center ListEmptyComponent #517
Replies: 23 comments 4 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 |
Beta Was this translation helpful? Give feedback.
-
Please, also add the columnWrapperStyle prop When we have two or more columns in our layout |
Beta Was this translation helpful? Give feedback.
-
I think issue is more efficient to point the problem, unfortunately |
Beta Was this translation helpful? Give feedback.
-
This is a big issue that should be fixed! |
Beta Was this translation helpful? Give feedback.
-
i think you could use CellRendererComponent for that |
Beta Was this translation helpful? Give feedback.
-
I just encountered the same problem. I want to center my ListEmptyComponent |
Beta Was this translation helpful? Give feedback.
-
I also need |
Beta Was this translation helpful? Give feedback.
-
+1 I also need this added |
Beta Was this translation helpful? Give feedback.
-
@naqvitalha does this worth to take a look? |
Beta Was this translation helpful? Give feedback.
-
We recently merged Flashlist support to react-native-collapsible-tab-view and ran into a similar isssue: We were using |
Beta Was this translation helpful? Give feedback.
-
any updates on this? |
Beta Was this translation helpful? Give feedback.
-
any updates on this one? 🙂 |
Beta Was this translation helpful? Give feedback.
-
damn! not fixed |
Beta Was this translation helpful? Give feedback.
-
F**, I'm facing this issue and the @tomasmozeris does not work anymore in v1.5. |
Beta Was this translation helpful? Give feedback.
-
What a complex bug to fix, this may be a blocker to migrate from FlatList to FlashList |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
+1 A workaround for now is just to conditionally render. |
Beta Was this translation helpful? Give feedback.
-
Hope it will be supported soon |
Beta Was this translation helpful? Give feedback.
-
addressed in #1206 |
Beta Was this translation helpful? Give feedback.
-
same problem using FlashList 1.5.0 |
Beta Was this translation helpful? Give feedback.
-
Problem
I have
ListEmptyComponent
component, 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-list
andrecyclerlistview
withflexGrow: 1
in 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 supportflexGrow
incontentContainerStyle of Flashlist
Beta Was this translation helpful? Give feedback.
All reactions