加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native错误:in next release empty section headers ...

发布时间:2020-12-15 03:25:16 所属栏目:百科 来源:网络整理
导读:升级 React Native 到最新版本出现了一个 Warning : Warning:In next release empty section headers will be rendered.In this release you can use 'enableEmptySections' flag to render empty section headers 这个错误出现在 ListView 中,在以后的版

升级React Native到最新版本出现了一个Warning

Warning:In next release empty section headers will be rendered.
In this release you can use 'enableEmptySections' flag to render empty section headers

这个错误出现在ListView中,在以后的版本中才会实现空的section headers作为默认值,当前版本并没有支持。
如果我们不需要使用headers的话,可以禁止EmptySections
解决方法:

<ListView
   style={styles.listView}
   dataSource={this.state.dataSource}
   enableEmptySections={true}
   />

参考文档:
http://facebook.github.io/react-native/docs/listview.html#enableemptysections

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读