Corbi-Wan KenobiC
Convex Community11mo ago
8 replies
Corbi-Wan Kenobi

TanStack Start and Convex Pagination glitches

TanStack Start 1.111.10, and Convex bits version as of today. I'm loading a component into an Outlet that is a table that displays a list of models of devices. Using the instructions for Paginated Queries I'm able to load 10 items at a time, but there one odd (to me) behavior and one crash.

Odd behavior - I have a Load More button that does load more, but it reloads Outlet. Is that nomral? I thought it would just append to the end of the table. It's not doing a full root reload, but its reloading the outlet and adding 10.

Crash - when I get to the end of the rows, TanStack crashes with the following.
[CONVEX Q(deviceModels:getAllModels)] [Request ID: 9c6fbc4b7cfc4b65] Server Error Uncaught TypeError: Must provide arg 1 "id" to "get" at <anonymous> (../convex/deviceModels.ts:29:34) at map [as map] (<anonymous>) at handler (../convex/deviceModels.ts:28:14) Called by client

There is a key=ID on each table row. Like I said, this only happens when I try to load the last page of results. Feels like a TanStank Start glitch? Something to do with the query maybe? Typical Convex queries need some extra convexQuery love so I'm wondering it this is a TSStart/Convex/TSQuery interaction.
Was this page helpful?