Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to render flat list horizontally and vertically?

I have a 10x10 matrix and I want to render it in a flat list. How can I enable vertical and horizontal scrolling on this so that user can select the item of their choice out of 10X10 matrix. I just want my flat list to be scrolled in both the ways.

like image 631
Prateek Gupta Avatar asked Oct 28 '25 10:10

Prateek Gupta


1 Answers

Please pass this in flatlist numColumns={10} according to number of columns you want to show , it will display items horizontally in a flatlist in a grid format (You don't need separate scrollview)

like image 160
Rishi Sahu Avatar answered Oct 31 '25 02:10

Rishi Sahu