Pull to Refresh does not work when FlatList nested inside <Content>
See original GitHub issueI am on react-native 0.53.3
and native-base 2.3.9
.
I am using FlatList
from react-native
because some of the features which are not readily available in native-base’s List component. And there is this one issue I am not able to solve.
The FlatList
api of react-native provides native pull to refresh ability. While it works perfectly when FlatList is embedded inside <View>
, it doesn’t work if I nest it inside <Content>
, pulling would simply do nothing.
I suspect this has something to do with margin and other styling elements because if you simply nest FlatList
inside <Content>
, the top and bottom margin won’t fit perfect and you will have to use padding/margin styling to make the FlatList
not go out of the view port.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
React-Native: FlatList onRefresh not called on pull up.
Current Behavior: I'm trying to update a list gotten from a server by pulling up on the view. When I do the onRefresh...
Read more >Displaying a List in React Native: Map Method or FlatList ...
In this article, I'll walk you through using two methods of listing data in a React Native app: displaying the list with map...
Read more >Optimizing Flatlist Configuration - React Native
Use basic components. The more complex your components are, the slower they will render. Try to avoid a lot of logic and nesting...
Read more >SectionList - React Native
SectionList. A performant interface for rendering sectioned lists, supporting the most handy features: Fully cross-platform.
Read more >FlatList - React Native
flatlist-selectable · Internal state is not preserved when content scrolls out of the render window. · This is a PureComponent which means that...
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
I also ran into this. Resolved it on my side by making the
I have the same problem and I fixed it By <Content padder contentContainerStyle={{ flex: 1 }}>