【发布时间】:2019-04-30 08:43:32
【问题描述】:
我正在使用 react-native 的 SectionList 并且无法隐藏我的数据集的空白部分的部分标题。我只想显示节标题和不为空的节的行。
【问题讨论】:
-
您应该将@Andre Simon 的回答标记为已接受
标签: list react-native header sectionheader react-native-sectionlist
我正在使用 react-native 的 SectionList 并且无法隐藏我的数据集的空白部分的部分标题。我只想显示节标题和不为空的节的行。
【问题讨论】:
标签: list react-native header sectionheader react-native-sectionlist
这就是我所做的:
<SectionList
renderSectionHeader={({ section }) => (
section.data.length > 0 ? this._renderHeader(section.title) : (null)
)}
...
/>
【讨论】: