-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bi-directional infinite query will not fetch previous page if initial prevCursor is null #8330
Comments
the sandbox is inaccessible - likely because it’s private or in your drafts. Please make it public |
my bad, it's fixed |
still doesn’t work for me trying to start it up. Stackblitz is so much better these days :/
|
Can't it working on codesandbox/stackbiltz. Instead |
Describe the bug
Bi-directional infinite query will not fetch previous page if initial prevCursor is null. Sorry but I can't be more descriptive. Please see the codesandbox link provided.
Your minimal, reproducible example
git clone https://github.com/Apestein/apestein-react-infinite-scroller.git
bun install
git checkout tanstack-query-bug
bun run dev
go to app called "demo" localhost:3002
Steps to reproduce
Observe the behavior of the infinite scroll container on the right, which is a bi-directional infinite scroll component. It will work as intended (scroll to 49, then scroll back). Now uncomment line 18 in the actions.ts file. Now inverse scrolling will no longer work (scroll to 49 then try to scroll back).
The intended behavior is for pageParam 0 to be the last page, meaning 0 is the last number that will appear. Maybe I'm not seeing something but I think this is a bug.
Expected behavior
The intended behavior is for pageParam 0 to be the last page, meaning 0 is the last number that will appear. Maybe I'm not seeing something but I think this is a bug.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS: ubuntu linux
Browser: chrome
Tanstack Query adapter
None
TanStack Query version
v5.60.2
TypeScript version
v5
Additional context
No response
The text was updated successfully, but these errors were encountered: