【发布时间】:2023-04-03 02:19:01
【问题描述】:
我在我的 ract-native 页面(库 ract-native-timeline-listview)中使用了 Basic Usage 时间线列表视图。它适用于其默认数据。
但是当我通过componentWillMount() 包含数据时
componentWillMount() {
var list = CustomerStore.usagelist;
this.setState({data:list});
console.log(JSON.stringify(list));
}
日志在运行 render() 之前打印数据,但列表视图没有显示,而是引发警告
警告:在下一个版本中,将呈现空的节标题。在此版本中,您可以使用“enableEmptySections”标志来呈现空的节标题。
flag我也用过,但是没用。
<Timeline data={this.state.data} enableEmptySections={true} />
有人对此有解决方案吗?
我正在使用 React-Native :0.38
【问题讨论】:
-
包括渲染函数(即renderEvent、renderDetail、renderCircle、renderTime等)
-
谢谢。我已经通过 react-native-timeline-listview 中的 Pull Refresh 类型的列表视图解决了这个问题。
标签: listview react-native timeline