I am using react-native-collapsible-tab-view in my sample project. I'm having auto scroll to top issue when :- reached to the bottom most item of flatlist and api returns the data and it set's to the setdata of the flatlist.this issue is only in "tab1", other tabs are fine. video is also attached in reference of the issue. Please help me out.
Asked
Active
Viewed 818 times
1 Answers
0
how are you updating data upon load more functionality in the FlatList ? Make sure you use something like
setFlatListData([...FlatListData, ...responseJson.results])
this will create appropriate references in the useState hook. If you are using local data don't change the whole list data at once

Equan Ur Rehman
- 229
- 1
- 2
- 11
-
setFlatlist(oldFeed => [...oldFeed, ...newFeedItems]); --> i am using same thing ,still this happening , it is happening for tab1 only. – MURARI Yadav Jun 14 '22 at 07:34