React-window: Fetch more from remote

Created on 13 Aug 2018  路  3Comments  路  Source: bvaughn/react-window

Is it possible to fetch more data from the remote location if the scroll is at the end? If yes, how would I build this? If not I would love to help adding that feature 馃憤 .

馃挰 question

Most helpful comment

I'm using this to detect list position (top & bottom) and get items that changed visibility. Using it for grids but should work for lists too.
https://gist.github.com/superandrew213/22aca60ff7740eadc481b5d9a4eebdca

All 3 comments

You should be able to build this on top of what's already in react-window. You're basically describing the InfiniteLoader component in react-virtualized. I believe all you should need to build this is the onItemsRendered property.

I don't think I want this functionality added to the base library, because added features like this bloated react-virtualized over time and made it harder to maintain. Perhaps we could add a link somewhere to a Gist or Code Sandbox though, showing how the technique could be achieved (if you'd like to share back). 馃槃

I'm going to close this issue for now since I don't plan on working on it. We can chat more here though if there's follow up.

I can totally understand that! onItemsRendered sounds like a good place to add this. Thanks for the hint. Hopefully I will be able to add this to the project I am currently freelancing on and report back. Can't promise it though, the project manager could change the priorities :wink:.

I'm using this to detect list position (top & bottom) and get items that changed visibility. Using it for grids but should work for lists too.
https://gist.github.com/superandrew213/22aca60ff7740eadc481b5d9a4eebdca

Was this page helpful?
0 / 5 - 0 ratings