williaster commented on a change in pull request #3993: [Explore view] Use POST 
method for charting requests
URL: 
https://github.com/apache/incubator-superset/pull/3993#discussion_r156467702
 
 

 ##########
 File path: 
superset/assets/javascripts/explore/components/ExploreViewContainer.jsx
 ##########
 @@ -101,13 +106,43 @@ class ExploreViewContainer extends React.Component {
     }
   }
 
+  addHistory(isReplace = false, title) {
+    const { payload } = createExplore(this.props.form_data);
+    const longUrl = getExploreLongUrl(this.props.form_data);
+    if (isReplace) {
+      history.replaceState(
+        payload,
+        document.title,
+        longUrl);
+    } else {
+      history.pushState(
+        payload,
+        document.title,
+        longUrl);
+    }
+
+    // it seems browsers don't support pushState title attribute
+    if (title) {
+      document.title = title;
+    }
+  }
+
   handleResize() {
     clearTimeout(this.resizeTimer);
     this.resizeTimer = setTimeout(() => {
       this.setState({ height: this.getHeight(), width: this.getWidth() });
     }, 250);
   }
 
+  handleNavigate() {
+    const formData = history.state;
+    if (formData && Object.keys(formData).length) {
+      this.props.actions.setExploreControls(formData);
+      this.props.actions.runQuery(formData, false,
 
 Review comment:
   nit -- I would do newlines for each `var` here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to