React Native - SectionList numColumns support

前端 未结 3 1025
一整个雨季
一整个雨季 2021-01-04 06:23

FlatList has numColumns support. How to set numColumns with SectionList?

Github issue: SectionList renderItem multi item support #13192

3条回答
  •  孤城傲影
    2021-01-04 07:19

    Digging this issue up, I came with a solution similar to Pir Shukarullah Shah 's.

    I'm using FlatList instead of my regular item, taking into account only the first item in 's renderItem method.

     _renderList = ({ section, index }) => {
        if (index !== 0) return null;
    
        return (
          
        )
      }
    
    
    
    ...
          
    

提交回复
热议问题