Skip to content

Fix navigation inside tabs with a tableview replacing all query param…#1218

Merged
juhanikat merged 2 commits into
mainfrom
fix-usenavigate-url-issues
Jul 12, 2026
Merged

Fix navigation inside tabs with a tableview replacing all query param…#1218
juhanikat merged 2 commits into
mainfrom
fix-usenavigate-url-issues

Conversation

@juhanikat

Copy link
Copy Markdown
Collaborator

…s in url

See #1199 . The problem was that when switching to any tab with a TableView inside, useSyncTabSearch replaced the tableState query param with its tab param. Now whenever a tab is changed, all query params are cleared, and the tableState query param is added to the URL afterwards.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to stop URL flicker / infinite navigation loops when switching tabs that contain a TableView, by preventing competing navigate(...) calls from repeatedly overwriting each other’s query parameters (Issue #1199).

Changes:

  • Updates useSyncTabSearch to decide whether to navigate based on the current tab query param value (instead of comparing the whole location.search string).
  • Updates TableView’s table-state URL builder to preserve existing query params when adding/updating the tableState param.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/hooks/useSyncTabSearch.ts Changes tab-sync logic to check only the tab param before navigating.
frontend/src/components/TableView/TableView.tsx Preserves existing query params when adding tableState to generated URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/hooks/useSyncTabSearch.ts Outdated
Comment thread frontend/src/components/TableView/TableView.tsx
@juhanikat
juhanikat merged commit 4dff863 into main Jul 12, 2026
4 checks passed
@juhanikat
juhanikat deleted the fix-usenavigate-url-issues branch July 12, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite navigation loop/flickering url in some tables

2 participants