Real horizontal flatlist with multiple lines

I am trying to implement a horizontal scroll list that has two lines. Using FlatList, the vertical scroll list includes an installation numColumns, but the equivalent is to use horizontal rows.

I was able to do it right, and it works flawlessly. However, it is warned that the installation is flexWrapnot supported in VirtualizedListor FlatList, but for using numColumns. I cannot use numColumns, as this is not intended for horizontal lists.

<FlatList
    horizontal={true}
    contentContainerStyle={{
        flexDirection: 'column',
        flexWrap: 'wrap'
    }}
    {...otherProps}
/>

I found a commit where this warning was added, but cannot find the argument behind it. There seems to be no way to do this work without warning thrown, at least without a clear FlatList. Is there a more suitable solution for horizontal lists with strings?

Literature:

+4
source share

Source: https://habr.com/ru/post/1684670/


All Articles