From 387a3f1b60a780c4d2086c8fb4b4a5ffd05df838 Mon Sep 17 00:00:00 2001 From: MichaelSun48 Date: Sun, 22 Sep 2024 15:18:23 -0700 Subject: [PATCH] Fix bug where unsaved changes wouldn't be detected when reloaded on a tab with different query --- static/app/views/issueList/customViewsHeader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/views/issueList/customViewsHeader.tsx b/static/app/views/issueList/customViewsHeader.tsx index 3fd9088d83c6e..632060f3f497c 100644 --- a/static/app/views/issueList/customViewsHeader.tsx +++ b/static/app/views/issueList/customViewsHeader.tsx @@ -237,7 +237,7 @@ function CustomViewsIssueListHeaderTabsContent({ setDraggableTabs( draggableTabs.map(tab => - tab.key === selectedTab!.key + tab.key === selectedTab.key ? { ...tab, unsavedChanges, @@ -289,7 +289,7 @@ function CustomViewsIssueListHeaderTabsContent({ return; } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [navigate, organization.slug, query, sort, viewId]); + }, [navigate, organization.slug, query, sort, viewId, tabListState]); // Update local tabs when new views are received from mutation request useEffect(() => {