From 77cc7b3d0728bf2e6c91c9697deeb0ca83467f8e Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Thu, 6 Jan 2022 21:30:31 -0800 Subject: [PATCH 1/2] fix: fix update slug name --- .../src/dashboard/components/nativeFilters/FilterBar/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index 4f252e0de3ed1..c1c5719e5cd8a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx @@ -216,6 +216,9 @@ const FilterBar: React.FC = ({ } newParams.set(URL_PARAMS.nativeFiltersKey.name, dataMaskKey); + // pathname could be updated somewhere else through windows.history + // keep react router history in sync with window history + history.location.pathname = window.location.pathname; history.replace({ search: newParams.toString(), }); From 7f5af3e1b7ad0506198c3f54d922c425decf5ed9 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Fri, 7 Jan 2022 10:06:22 -0800 Subject: [PATCH 2/2] Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> --- .../src/dashboard/components/nativeFilters/FilterBar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index c1c5719e5cd8a..5fb80cda4c230 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx @@ -216,7 +216,7 @@ const FilterBar: React.FC = ({ } newParams.set(URL_PARAMS.nativeFiltersKey.name, dataMaskKey); - // pathname could be updated somewhere else through windows.history + // pathname could be updated somewhere else through window.history // keep react router history in sync with window history history.location.pathname = window.location.pathname; history.replace({