react-infinite-scroller icon indicating copy to clipboard operation
react-infinite-scroller copied to clipboard

Add elements to the middle of a list

Open vctt94 opened this issue 5 years ago • 0 comments

Describe the bug I need to add elements in the middle of a list Here is the problem:

I have a map representing my objects, which starts fetching descending data. If the user toggles to see elements ascending, it will fetch elements from the begining, but now I have elements in the beginning and in the end of the list.

So when going to the bottom of page, as my final elements will always be the same, and it will always add different elements to the beginning, it will fetch forever.

Expected behavior As I can not know how many entries the user already has fetched, I can not simply scroll up a bit, to fix it. Is there a way I could check elements to stop fetching them or go up an offset value?

vctt94 avatar May 20 '20 20:05 vctt94