This is an automated email from the ASF dual-hosted git repository.

pkdotson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new ebec353  fix(dashboard): Remove edit from url params when discarding 
changes (#15709)
ebec353 is described below

commit ebec353351aed9421c7db8fdeb8a7a9c05ca97ab
Author: Geido <[email protected]>
AuthorDate: Thu Jul 22 21:58:43 2021 +0200

    fix(dashboard): Remove edit from url params when discarding changes (#15709)
    
    * Remove edit from url params
    
    * Change replace to assign
---
 superset-frontend/src/dashboard/components/Header/index.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx 
b/superset-frontend/src/dashboard/components/Header/index.jsx
index b459577..79411fa 100644
--- a/superset-frontend/src/dashboard/components/Header/index.jsx
+++ b/superset-frontend/src/dashboard/components/Header/index.jsx
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.assign(url);
   }
 
   constructor(props) {

Reply via email to