-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Current behavior
When numColumns > 1 and ItemSeparatorComponent is used to provide gap between rows. The last item's height is stretched, making it taller than the item in the same row.
Setting a fixed height on each item can fix the issue, by in my case I want it to have a dynamic height.
Expected behavior
The following is the same code using v1.8.0, all item on the same row should have the same height
To Reproduce
<FlashList
data={Array.from({ length: 10 }).fill("")}
numColumns={2}
renderItem={() => (
<View
style={{
backgroundColor: "green",
flex: 1,
justifyContent: "center",
alignItems: "center",
padding: 16,
}}
>
<View style={{ backgroundColor: "blue", height: 80, width: 80 }} />
</View>
)}
contentContainerStyle={{
paddingHorizontal: 16,
}}
keyExtractor={(_, i) => i.toString()}
ItemSeparatorComponent={() => (
<View style={{ backgroundColor: "yellow", height: 10 }} />
)}
/>
Platform:
- iOS
- Android
Environment
2.0.2
e-simpson
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working