Describe the bug
A derived collection created by a parameterized nested query renders for its
first document but remains pending when the parameter changes to a second
document. The identical query succeeds with useLiveQuery.
To reproduce
https://github.com/meesvandongen/tanstack-db-repro
pnpm install
pnpm run repro
The example displays a Documents view and a Tags view. The Tags view evaluates
a query for the selected document:
Document -> folder membership -> folder -> tag
The test changes the selected document through the UI and performs:
- Select Documents.
- Select Document A.
- Select Details, then Tags.
- Return to Documents.
- Select Document B.
- Select Details, then Tags.
Output:
useLiveSuspenseQuery Document A 1
useLiveSuspenseQuery Document B 0
useLiveQuery Document A 1
useLiveQuery Document B 1
The number is the count of rendered tag views. The first two lines use
useLiveSuspenseQuery; the last two are the useLiveQuery control.
Expected behavior
Both Document A and Document B should render their tag view.
Actual behavior
The second useLiveSuspenseQuery view does not render within the test
interval, while the non-Suspense control renders both views.
Versions:
@tanstack/db: 0.6.17
@tanstack/electric-db-collection: 0.3.15
@tanstack/react-db: 0.1.95
react: 19.2.8
vite: 8.2.0
Describe the bug
A derived collection created by a parameterized nested query renders for its
first document but remains pending when the parameter changes to a second
document. The identical query succeeds with
useLiveQuery.To reproduce
https://github.com/meesvandongen/tanstack-db-repro
The example displays a Documents view and a Tags view. The Tags view evaluates
a query for the selected document:
The test changes the selected document through the UI and performs:
Output:
The number is the count of rendered tag views. The first two lines use
useLiveSuspenseQuery; the last two are theuseLiveQuerycontrol.Expected behavior
Both Document A and Document B should render their tag view.
Actual behavior
The second
useLiveSuspenseQueryview does not render within the testinterval, while the non-Suspense control renders both views.
Versions:
@tanstack/db:0.6.17@tanstack/electric-db-collection:0.3.15@tanstack/react-db:0.1.95react:19.2.8vite:8.2.0