bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.82k stars 785 forks source link

Loading indicator while it loads all 1m rows #758

Closed rchancey closed 7 months ago

rchancey commented 7 months ago

@bvaughn is there a neat trick that would allow us to show a progress indicator while the internal list is created. I don't mean the infinite loader. I mean I have 700k lines and they are all being loaded in the auto sizer and I would like to show a progress while it loads and not a blank screen. I am not sure there is a way since react is working to render the content but perhaps you know a way?

again not lazy loading content I have all the content in hand.. just a big splat. But it's a few seconds of splat that I want to show something.. if that makes sense? Appreciate any insight.

bvaughn commented 7 months ago

Loading state isn’t something this library should have knowledge about. I would suggest you manage that in your application code. You could render an indeterminate progress bar that overlaps the list or something, and hide it in a layout effect from your item renderer or something.

(sent from mobile, so brief)