Bi-directional Paginated Queries
usePaginatedQuery hook currently functions by first loading an initial page of results starting at the top of the list. More pages can then be loaded using the .loadMore(n) function. This pagination is always one-directional (ie. you always start with the first page and load future pages)In some cases you may want to load a paginated list starting from a specific item in the list instead of the start of the list. This is useful for jumping to a particular item in a long paginated list.
In React Query useInfiniteQuery
React Query allows the user to pass in an
initialCursor which can define the start point for loading the page. From there the user can call fetchPreviousPage() to fetch earlier items in the list (ie before the start cursor) and fetchNextPage() to fetch later items in the list.Requested Functionality: A hook similar to useInfiniteQuery that functions like convex/react's
usePaginatedQuery but includes the ability to specify an initalCursor and a method to fetch eariler entries (.loadPrev(n))I'm still evaluating the docs here to see if this functionality could fit into the existing pagination model used by convex, but I figured I'd post this here to see if anyone has solved this problem previously or if any alternate solutions might exist for jumping to a specific item in a paginated query.

