[FlatList] FlatList rows are rendered,but it's white.
See original GitHub issue<ScrollView
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this._onRefresh.bind(this)}
tintColor="#192c4d"
title=" refresh......."
titleColor={'red'}
/>}
onScroll={this._onScroll.bind(this)}
style={{ flex: 1, backgroundColor:'white',marginTop:-20}}>
{this.renderHeader()}
<View style={{ flex: 1}}>
< FlatList
key={(this.state.horizontal ? 'h' : 'v')}
ref={this.listRef.bind(this)}
style={{ flex: 1, backgroundColor: 'white' }}
renderItem={this.renderItem.bind(this)}
itemHeight={PIC_ITEM_HEIGHT}
renderHeader={this.state.awardHeader&&this.state.awardHeader.isReceive==0?this.renderListHeader.bind(this):undefined}
numberOfRow={(this.state.horizontal ? 3 : 1)}
}
onRefresh={this.onRefresh.bind(this)}
onEndReached={this.onInfinite.bind(this)}
initialNumToRender={12}
removeClippedSubviews={false}
>
</FlatList>
</View>
</ScrollView>
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[FlatList] Sometimes FlatList rows are rendered, but not ...
Description When using FlatList, rows are not displayed though renderItem is called. ... FlatList should always display its rendered items.
Read more >A lot of white space between items of a flat list in react native
In your FlatList just remove these properties and the space of above & below the first and last items ... You have to...
Read more >react native flatlist infinite loop - You.com | The AI Search ...
Flatlist or VirtualizedList Scroll lags horribly after 30-40 rows . I am fetching the same data on onEndReached . Upto 30 rows its...
Read more >react-native-timeline-flatlist - npm
React Native Timeline Flatlist. npm version Platform. Timeline component for React Native App work for Android and iOS. It's a fork of ...
Read more >FlatList - React Native
FlatList. A performant interface for rendering basic, flat lists, supporting the most handy features: Fully cross-platform.
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 FreeTop 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
Top GitHub Comments
@RyanRong @gonzalezchris I ran into the same issue on Android and finally found the solution for it:
Do NOT apply style (especially with backgroundColor) to FlatList itself, apply to its wrapper instead.
If you try to apply a red backgroundColor to FlatList, after pull-to-refresh you can actually see a big red screen without any content displaying, while all the invisible contents are actually underneath and accepting tap etc.
So it might be because of a bug about zIndex after pull-to-refresh, which is working well on iOS.
BTW, it seems that styles like padding are not working so well on Android if directly applied to FlatList as well.
the solution of @JaxGit works