繁体   English   中英

SectionList React-Native

[英]SectionList React-Native

作为sectionList Renders Header异构列表中项目列表的自然属性:例如:

<SectionList
  sections={[ // heterogeneous rendering between sections
    {data: [...], renderItem: ...},
    {data: [...], renderItem: ...},
    {data: [...], renderItem: ...},
  ]}
/>

如何在主标题下呈现SubHeader列出 SubHeader 的项目以及MainHeader

您可以将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

希望这能解决您的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM