You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by gr...@apache.org on 2017/11/10 05:48:10 UTC

[incubator-superset] branch master updated: First time fetching chart should not force refresh. (#3822)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6c52f2f  First time fetching chart should not force refresh. (#3822)
6c52f2f is described below

commit 6c52f2ff72905bdbe554780d218b41ce45846231
Author: Grace Guo <gr...@airbnb.com>
AuthorDate: Thu Nov 9 21:48:05 2017 -0800

    First time fetching chart should not force refresh. (#3822)
---
 superset/assets/javascripts/chart/Chart.jsx | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/superset/assets/javascripts/chart/Chart.jsx b/superset/assets/javascripts/chart/Chart.jsx
index f775e89..f7c7e69 100644
--- a/superset/assets/javascripts/chart/Chart.jsx
+++ b/superset/assets/javascripts/chart/Chart.jsx
@@ -62,7 +62,12 @@ class Chart extends React.PureComponent {
   }
 
   componentDidMount() {
-    this.runQuery();
+    if (this.props.triggerQuery) {
+      this.props.actions.runQuery(this.props.formData, false,
+        this.props.timeout,
+        this.props.chartKey,
+      );
+    }
   }
 
   componentWillReceiveProps(nextProps) {
@@ -123,13 +128,6 @@ class Chart extends React.PureComponent {
     return d3format(format, number);
   }
 
-  runQuery() {
-    this.props.actions.runQuery(this.props.formData, true,
-      this.props.timeout,
-      this.props.chartKey,
-    );
-  }
-
   render_template(s) {
     const context = {
       width: this.width(),

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].