From 765c72a8584068fdac85195a71279477a12db632 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Fri, 7 Jan 2022 11:37:12 -0800 Subject: [PATCH] fix: update slug name (#17961) * fix: fix update slug name * Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> --- .../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 5016fb26560f..02156b22bc62 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 window.history + // keep react router history in sync with window history + history.location.pathname = window.location.pathname; history.replace({ search: newParams.toString(), });