Comments (3)
I receive this too and I am using react 0.55 as well. Previously, the timeline rendered fine.
Visually, it doesn't render at all and get the following message:
Stack strace:
Warning: In next release empty section headers will be rendered. In this release you can use 'enableEmptySections' flag to render empty section headers.
- node_modules/fbjs/lib/warning.js:33:20 in printWarning
- node_modules/fbjs/lib/warning.js:57:25 in warning
- node_modules/react-native/Libraries/Lists/ListView/ListView.js:432:12 in ListView_render
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:8811:23 in finishClassComponent
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12924:25 in performUnitOfWork
from react-native-timeline-listview.
@neogeno, how was you passing data to the 'data' prop? Previously I passed it a function which mapped my data into the structure required by the component.
I have since moved that logic out to a separate function and invoked it and works fine for me now without the warning messages.
Old way that no longer works for me:
<Timeline data={() => { return [{ title: 'example', description: 'example }] }} />
Extracted way which works:
getData() { return [{ title: 'example', description: 'example }] } render() { <Timeline data={this.getData()} /> }
from react-native-timeline-listview.
UPDATE: The easiest way is to use options
.
<Timeline options={{ enableEmptySections: true }} />
===================================================================
In your project folder find node_modules
and then scroll down to find react-native-timeline-listview
open that folder and find lib
open that too and click on index.js
On the render() find the code below and put enableEmptySections
. Check documentation here React-Native ListView
<ListView
enableEmptySections
ref="listView"
style={[styles.listview, this.props.listViewStyle]}
dataSource={this.state.dataSource}
renderRow={this._renderRow}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
automaticallyAdjustContentInsets={false}
{...this.props.options}
/>
After that the yellow warning will be gone
from react-native-timeline-listview.
Related Issues (20)
- renderDetail, NOT renderEvent
- How to add custom view HOT 1
- Modern Timeline update (aka FlatList support) HOT 1
- Add button options for timeline
- Line overlaps the icon
- Animated Line
- Not shown on android
- can we align starting point of circle main label in same line HOT 3
- fontFamily not work for titleStyle HOT 1
- Conditional Rendering of Details for a Row
- Render Circle displays icons to far right of 2 column HOT 3
- 使用renderCircle后圆环位置偏移
- collected in excellent-RN-libs
- two column timeline align columns
- ListView Deprecated HOT 5
- ListView has been removed from React Native HOT 5
- Update required to 0.60.5 HOT 3
- How to set line above the starting timeline circle?
- Is it possible to align circle to center ? HOT 1
- ERROR Invariant Violation: ListView has been removed from React Native. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-timeline-listview.