I have a FlatList with multiple columns:
I watched your Expo. It is as below.
1 2 3 4
---------------
5 6 7 8
I assume you want as below.
1 | 2 | 3 | 4
---+---+---+---
5 | 6 | 7 | 8
To do this, It is not possible with ItemSeparatorComponent
only.
as Hazim Ali says, use different style per index.
renderItem={({ item, index }) => (
{item}
)}
This is the complete example.
--
But the separator only appear between rows, not between columns
As far as I read the source code, when numColumns > 2, there is no itemseparator between columns. Itemseparator is only between row and row.
Here is example. When numColumns is set 4, four items are grouped to one cell. And one itemSeparator is put between cells.
1 2 3 4 <- cell1
--------------- <- itemSeparator
5 6 7 8 <- cell2