React native ReactNative:SectionList SectionHeaders覆盖ListFooter

React native ReactNative:SectionList SectionHeaders覆盖ListFooter,react-native,react-native-sectionlist,React Native,React Native Sectionlist,我有一个React本机页面,其中包含核心组件SectionList。SectionList具有粘性节标题(stickySectionHeadersEnabled)和列表页脚(ListFooterComponent)。当用户滚动过最后一个部分时,最后一个部分的页眉仍会粘在页面顶部,覆盖页脚。但是,我更希望粘性标题包含在节列表区域的主体中,而不是在最后一节结束后保留在屏幕上 是否可以通过SectionList实现这一点,或者我应该采取另一种方法 展示这种行为的Expo零食(仅限iOS和Android

我有一个React本机页面,其中包含核心组件SectionList。SectionList具有粘性节标题(stickySectionHeadersEnabled)和列表页脚(ListFooterComponent)。当用户滚动过最后一个部分时,最后一个部分的页眉仍会粘在页面顶部,覆盖页脚。但是,我更希望粘性标题包含在节列表区域的主体中,而不是在最后一节结束后保留在屏幕上

是否可以通过SectionList实现这一点,或者我应该采取另一种方法

展示这种行为的Expo零食(仅限iOS和Android)

item+index}
renderItem={({item})=>({item})}
renderSectionHeader={({section:{title}}})=>({title}})
stickySectionHeadersEnabled={true}
ListFooterComponent={ListFooterComponent}
/>

为了解决这个问题,我在SectionList数据的底部添加了一个空部分。最后一个SectionHeader仍然覆盖ListFooter,但因为它是高度为0的视图,所以您无法看到它

    <SectionList
      sections={DATA}
      keyExtractor={(item, index) => item + index}
      renderItem={({ item }) => (<View style={styles.item}><Text style={styles.title}>{item}</Text></View>)}
      renderSectionHeader={({ section: { title } }) => (<Text style={styles.header}>{title}</Text>)}
      stickySectionHeadersEnabled={true}
      ListFooterComponent={<View style={styles.footer}><Text>ListFooterComponent </Text></View>}
    />