-
Describe the bug To Reproduce
Expected behavior
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
A flatmap should be possible like this: useInfiniteQuery('key', fetchPages, {
select: data => ({
pages: data.pages.flatMap(x => x),
pageParams: data.pageParams
})
}) |
Beta Was this translation helpful? Give feedback.
-
@boschni that works for flattening, but I have to keep the |
Beta Was this translation helpful? Give feedback.
-
I don't think it would be easy to implement something like that but PRs are welcome! |
Beta Was this translation helpful? Give feedback.
-
I've recently had the same issue. In JavaScript I have no problem doing this: useInfiniteQuery('key', fetchPages, {
select: data => ({
return data.pages.flatMap(x => x)
})
}) In TypeScript we had to use The problem is that not sure how to fix that properly, though |
Beta Was this translation helpful? Give feedback.
-
we're now tracking this here: #3065 |
Beta Was this translation helpful? Give feedback.
we're now tracking this here: #3065