How to return extra pagination info from queryFn in TanStack Table?
My API returns something like this:
But
so my hack is for now adding the count to every object:
This works, but it feels hacky since I’m duplicating
Is there a cleaner way to pass back both the data array and the pagination info to TanStack’s queryFn?
@Kyle Mathews maybe you have an idea here since i see you are involved with the pagination stuff ? thanks in advance for the help
But
queryFn in queryCollectionOptions only allows returning an array of objects.so my hack is for now adding the count to every object:
This works, but it feels hacky since I’m duplicating
total_count into every item.Is there a cleaner way to pass back both the data array and the pagination info to TanStack’s queryFn?
@Kyle Mathews maybe you have an idea here since i see you are involved with the pagination stuff ? thanks in advance for the help