React Native FlatList separator between columns

前端 未结 6 1561
不思量自难忘°
不思量自难忘° 2021-02-18 20:57

I have a FlatList with multiple columns:

             


        
6条回答
  •  礼貌的吻别
    2021-02-18 21:28

    I am bit to the party but I ran into same problem and solved this problem by using this renderRow code. I have 2 columns in grid view. Please change column length by replacing X in index % X === 0 and index <= Y where Y is columns-1

    renderRow({ item, index }) {
        return (
          
    
          ... render item code ...
            
        )
      }
    

提交回复
热议问题