【发布时间】:2018-06-24 15:01:35
【问题描述】:
遵循 RN SectionList 文档。如果我想像示例中那样构建一个同质的节列表:
<SectionList
renderItem={({item, index}) => <ListItem title={item} index={index} />}
renderSectionHeader={({section}) => <Header title={section.title} />}
sections={[ // homogeneous rendering between sections
{data: [...], title: ...},
{data: [...], title: ...},
{data: [...], title: ...},
]}
/>
如何让index 在部分之间继续?就像现在一样,index reflects the Item's index within the section。对于每个部分,index 从零开始。有没有其他方法可以让索引从第一部分的第一项进展到最后一部分的最后一项。有什么想法吗?
【问题讨论】:
标签: javascript android ios reactjs react-native