作为sectionList的自然属性,呈现头和异构列表中的项目列表:例如:
<SectionList
sections={[ // heterogeneous rendering between sections
{data: [...], renderItem: ...},
{data: [...], renderItem: ...},
{data: [...], renderItem: ...},
]}
/>如何将SubHeaders呈现在主标题下面,并列出SubHeader以及MainHeader的项
发布于 2018-03-23 11:16:16
您可以使用ListHeaderComponent支柱作为主标题。而且您可以使用renderSectionHeader作为您的部分。还请记住,如果您不需要粘性头stickySectionHeadersEnabled={false}。
https://facebook.github.io/react-native/docs/sectionlist.html#listheadercomponent
https://facebook.github.io/react-native/docs/sectionlist.html#rendersectionheader
https://facebook.github.io/react-native/docs/sectionlist.html#stickysectionheadersenabled
希望这能解决你的问题。
https://stackoverflow.com/questions/48024074
复制相似问题