-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update slug name #17961
fix: update slug name #17961
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17961 +/- ##
=======================================
Coverage 67.07% 67.07%
=======================================
Files 1609 1609
Lines 64905 64906 +1
Branches 6868 6868
=======================================
+ Hits 43537 43538 +1
Misses 19502 19502
Partials 1866 1866
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
Outdated
Show resolved
Hide resolved
@@ -216,6 +216,9 @@ const FilterBar: React.FC<FiltersBarProps> = ({ | |||
} | |||
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this problem happen elsewhere too? Is there a global solution for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving it to get the quick fix, but we need to investigate for a global solution.
…rBar/index.tsx Co-authored-by: Michael S. Molina <[email protected]>
* fix: fix update slug name * Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Michael S. Molina <[email protected]> (cherry picked from commit 765c72a)
🏷 2022.1 |
* fix: fix update slug name * Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Michael S. Molina <[email protected]>
* fix: fix update slug name * Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Michael S. Molina <[email protected]>
* fix: fix update slug name * Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Michael S. Molina <[email protected]>
SUMMARY
This Pr fixes an issue where if you update the slug name of dashboard in the properties modal it would not reflect the change on save. This occured because the react-router is out of sync with the window state.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
before
https://user-images.githubusercontent.com/17326228/148497218-8177ef09-3412-4f90-aaa3-d5e6ce58802d.mov
after
Screen.Recording.2022-01-06.at.9.38.21.PM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION