Skip to content

Commit

Permalink
fix(custom-views): Fix broken back-navigation when hitting issues (#7…
Browse files Browse the repository at this point in the history
…6894)

This PR fixes an issue where you would not be able to navigate backwards
after clicking on "Issues" in the sentry sidebar.
  • Loading branch information
MichaelSun48 committed Sep 3, 2024
1 parent 9fc36f7 commit f343e04
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions static/app/views/issueList/customViewsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,18 @@ function CustomViewsIssueListHeaderTabsContent({
useEffect(() => {
// If no query, sort, or viewId is present, set the first tab as the selected tab, update query accordingly
if (!query && !sort && !viewId) {
navigate({
...location,
query: {
...queryParams,
query: draggableTabs[0].query,
sort: draggableTabs[0].querySort,
viewId: draggableTabs[0].id,
navigate(
{
...location,
query: {
...queryParams,
query: draggableTabs[0].query,
sort: draggableTabs[0].querySort,
viewId: draggableTabs[0].id,
},
},
});
{replace: true}
);
tabListState?.setSelectedKey(draggableTabs[0].key);
return;
}
Expand Down

0 comments on commit f343e04

Please sign in to comment.