Skip to content

Commit

Permalink
First time fetching chart should not force refresh. (#3822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo authored Nov 10, 2017
1 parent d663bea commit 6c52f2f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions superset/assets/javascripts/chart/Chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 6c52f2f

Please sign in to comment.