geido commented on a change in pull request #15709:
URL: https://github.com/apache/superset/pull/15709#discussion_r672118073



##########
File path: 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.replace(url);

Review comment:
       @rusackas Changing to `assign` allows to go back to the edit mode indeed 
which is what you are looking for, I guess. If the expectation is to undo the 
"discard changes" action instead, the back button won't be able to achieve 
that. Every component added and then discarded will be gone when going back.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to