Listview with alternating color in react native

后端 未结 4 860
一整个雨季
一整个雨季 2021-01-14 05:47

I have array of objects like the example below;

[{
        \"id\" : 13100,
        \"key\" : \"Emlak Vergisi\",
        \"y\" : 135638.98
    }, {
        \"         


        
4条回答
  •  半阙折子戏
    2021-01-14 06:30

    Yes in renderRow, apply a different style based on rowID or rowData etc

    Ex:

    renderRow(rowData, sectionID, rowID, highlightRow) {
        if(rowID%2 === 0) {
            return ();
        }
        return ();
    }
    

提交回复
热议问题