uncertain-scarletU
Refine16mo ago
29 replies
uncertain-scarlet

fighting with GetListResponse

I have a perfectly reasonable server API that returns an object:

{
  items: Item[],
  pagination: PaginationMeta,
}


this would work fine with raw React Query - I'd just implement select - but
useTable
is frustrating the simple elegance of useQuery by assuming the data is returned as a bare list (the tutorial assumes that metadata goes in response headers, which is not especially standard). I will probably make this work by implementing a DataProvider, but I wanted to register that the types could be improved considerably here around
useTable
to support different shapes of APIs.
Was this page helpful?