-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of paging/scrolling in large data sets via AJAX/REST #71
Comments
Hi @don-p. At the moment there is no infinite scroll functionality. I can look into adding that in the near future. The onExpand part I don't see why you can't do that now, is there something I'm missing? |
I would suggest looking at the implementations of existing infinite list/ree packages, rather than re-inventing. I suspect that there is a combination of approaches being used:
Some packages you could look at to examine the implementations: don |
Hey Don. That is not the problem I do have in that PR. Exposing a callback that fires when rows are rendered and a ref to register the children is enough and empowers the library users to do pagination in whatever manner they see fit. The easiest thing they can do is plug in react-virtualized infinite loader and with a few lines of code you will have pagination. It's important to minimize the amount of state inside this library, knowing if a row is loaded or not should not the handled by this library, if you think about it. Http requests are very prone to slowness and failure, writing the a state object is not a trivial operation as many things can go wrong, when someone tries to handle that inside an open source core 90% of the time it either does a bad job handling errors or is very prone to race conditions that can affect usability. What I want to figure out is a way to easily empower users to know if a row is loaded or not, all the rest is pretty much done. |
I don't think there is any reliable way to know if a row is loaded or not inside this source code, because all apps have their own business logic. Image that for example you have a websocket connection that signals to the client that a change occurred and you need to reload a certain batch of rows that were previously loaded, at this moment in time any internal state held by the component becomes obsolete and that is when hacks start to emerge |
In the "Large Collection" example, this shows how react-virtualized can work with a large list to manage the DOM and render only the visible subset of list items. This works great for the presentation of the data. However, in a real-world application we don't generate 250,000 items in the client/browser, and we don't load a large set like this from a server in one request/response.
So, we need a way to manage subsets of data via scrolling/paging.
What's the support and suggested approach for handling this, in this react-virtualized-tree component? Is there any built-in support to allow us to do something like this?
This is basically "Infinite Scrolling". In our application, we have customers that may have millions of children in nodes, so we need an approach like this to handle the presentation of the nested child nodes. Do you have any advice on how to provide this in the component?
Thanks.
The text was updated successfully, but these errors were encountered: