Lazy loading for a timeline calendar grid #6109
Unanswered
denisorehovsky
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I have a timeline calendar grid with data on the x and y-axis. Currently, the prototype looks like this:

The y-axis lists rental properties. There is not a lot of data on this axis (usually between 1-100 per account).
However, the x-axis has a lot of data because we display days on this axis. Nov 12, 2023, Sep 10, 2023, etc.
The calendar could show the timeline between 2020-01-01 - 2025-12-31 which is 2192 days (2192 columns). Displaying such a large amount of columns is possible with virtual scroll which is already implemented using https://tanstack.com/virtual/v3.
However, we need to lazy load data from the server in chunks. Let’s say we have 2192 columns and 100 rows. It will be 219200 cells to fill.
What we need is lazy loading for columns. For example, fetch data for 100 rows between 100-200 columns or between 1100-1200. I think that dividing data into 100 per chunk is good enough for us.
Now, how to implement it? I have problems using your infinite query. It’s not flexible enough.
At least that’s the idea right now and it’s difficult to make infinite scroll work for that. Are there any ideas? Also, is it possible to implement a custom infinite scroll?
Beta Was this translation helpful? Give feedback.
All reactions