window-table icon indicating copy to clipboard operation
window-table copied to clipboard

Is there a recommended approach for implementing infinite scrolling?

Open chrisjhoughton opened this issue 5 years ago • 1 comments

Hi there, amazing library you've built out!

One of the things that's really important for us is the ability to have an infinitely scrolling list. I'm thinking it might be possible to implement this with a sub-component that triggers an event to the parent on mount, but I'd love to know if anyone has implemented this already?

chrisjhoughton avatar Feb 02 '20 12:02 chrisjhoughton

Hi @chrisjhoughton Thank you for getting involved.

This library is based on react-window. And according to their docs, using the react-window-infinite-loader seems to be the preferred way of doing what you need. https://github.com/bvaughn/react-window#can-i-lazy-load-data-for-my-list

I haven't tried that myself yet. But from a quick look, I feel that the integration would just work. I will give this a go tomorrow or day after and will link a codesandbox. If you manage to do it yourself before that, please let us know.

Cheers.

pupudu avatar Feb 02 '20 13:02 pupudu