Offset initiated pagination
- I group contacts by the first letter of their name. I cache the A) number of groups B) number of contacts in each group C) total number of items. I'm using https://virtuoso.dev/scroll-to-group/ and the advantage of caching these three things is the user can jump to a letter and I can set the scrollbar size accurately as I know the total item count (it won't snap around as the user scrolls). This gives the user the illusion that the entire list of contacts is right there.
I've looked at the
getPage helper function for custom pagination, I think it can solve some of my problems, like jumping to a letter group directly but I don't think it solves all of my problems.For example, as the scrollbar is accurately sized to the total number of contacts, the user can drag it very rapidly from top to bottom. The problem is that Convex will continually call
loadMore for every page until the last. Instead, I can see the start/end indexes of the "slice" of the virtuoso list I'm in. Once this stops changing rapidly, I would like to exchange it to Convex for a cursor and then start paging as normal from there as the user scrolls. In other words, I need to support the user jumping to a random location in the list, identified by an offset, and only load that page directly.Is this possible?
