[FlatList] Sometimes FlatList rows are rendered, but not displayed until scroll. RN 0.43
See original GitHub issueDescription
When using FlatList, rows are not displayed though renderItem is called.
Rows appear immediately when scroll is triggered on the list.
Reproduction Steps and Sample Code
export default class List extends Component {
renderItem({item}) {
return (
<Text>{item}</Text>
);
}
render() {
return (
<FlatList
style={{
flex: 1,
backgroundColor: 'white',
}}
data={[1, 2]}
renderItem={this.renderItem}
/>
);
}
}
Solution
FlatList should always display its rendered items.
Additional Information
- React Native version: 0.43.0
- Platform: iOS
- Development Operating System: MacOS
- Dev tools: Xcode
Issue Analytics
- State:
- Created 6 years ago
- Reactions:36
- Comments:78 (27 by maintainers)
Top Results From Across the Web
React Native FlatList won't render until I scroll - Stack Overflow
I solved by using this on my FlatList: extraData={this.state} this way, FlatList knows it has to re-render. It's in the docs.
Read more >ListView doesn't render rows until scroll | Voters - React Native
This problem has been documented on Github in the following issues. It looks to crop up for some ListViews, but not all within...
Read more >react native flatlist infinite loop - You.com | The AI Search ...
When using FlatList, rows are not displayed though renderItem is called. Rows appear immediately when scroll is triggered on the list. Reproduction Steps...
Read more >Displaying a List in React Native: Map Method or FlatList ...
FlatList is a React Native component that provides scrolling features by default. ... But you can't see all the data because the list...
Read more >FlatList - React Native
To render multiple columns, use the numColumns prop. Using this approach instead of a flexWrap layout can prevent conflicts with the item height ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Does setting removeClippedSubviews={false} fix the issue? Sounds like the issue might be related to the navigator which would explain why we don’t see this problem at Facebook. cc @shergin
Hi mine fixed by giving
style={{ backgroundColor: 'white' }}to flat list