-
Notifications
You must be signed in to change notification settings - Fork 532
Open
Description
Describe the bug
I'm using React, TanStack Router, and TanStack Query to manage table state and URL synchronization.
The table is built using the Shadcn Table (based on DiceUI Data Table).
I'm facing issues where the filters and sorting states are not correctly synchronized between the UI, table data, and the URL parameters.
How to reproduce
-
Open the live demo or local project.
-
Apply a filter.
- The URL updates correctly, but the filter chip does not appear on the first attempt.
- Apply the same filter again — now the chip appears.
-
Apply a sorting option.
- The sorting label does not appear immediately.
- After a few seconds, the sorting resets automatically.
-
Refresh the page.
- The URL still shows the filter/sort parameters, but the data and UI are not in sync.
Link to Reproduction
- Live Demo: https://shadcn-table-demo.pages.dev/
- GitHub Repository: https://github.com/thedhruvish/shadcn-table-demo
Expected Behavior
Filters and sorting should remain fully synchronized between:
- The UI (filter chips, dropdowns, etc.)
- The URL parameters
- The table data, even after page refresh.
Actual Behavior
- First-time filters do not display chips.
- Sorting briefly appears then resets.
- Refreshing the page keeps query params but loses the applied filter/sort state.
Visual Reference
🎥 Video Demo
isuucs.video.mp4
🖼️ Screenshots
Above: The URL shows active filters, but the UI filter chips are not highlighted.
Additional information
- React
- TanStack Router
- TanStack Query
- DiceUI Data Table
Metadata
Metadata
Assignees
Labels
No labels

