SectionList不会渲染节头

时间:2018-08-07 19:27:48

标签: reactjs react-native react-native-android react-native-ios

我的SectionList不会在renderSectionHeader函数内部呈现任何内容。它将创建视图,但将为空。我尝试将图像Image运气不佳。项目行工作得很好,但是sectionHeader将没有任何内容。

COPY .  /opt/repos/pm3/

这是名字

render() {
    return(
      <SectionList
        style={fill}
        sections={deals}
        renderItem={
          ({item, index, section}) => (
            <View style={styles.container}>
              <Text style={[txt.med.left, styles.text]}>
                {item.name}
              </Text>
              <Text style={[txt.med.right, styles.text]}>
                {item.date}
              </Text>
            </View>
          )
        }
        renderSectionHeader={
          ({section: {title}}) => (
            <View style={styles.container2}>
              {names[title]}
            </View>
          )
        }
        keyExtractor={(item, index) => item + index}
      />
    )
  }
}

最重要的是,我无法向下滚动,只是会弹起。

0 个答案:

没有答案
相关问题