Issue: Auto scroll to Top in react-native-collapsible-tab-view

1k Views Asked by At

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.

enter image description here

1

There are 1 best solutions below

1
On

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