First time fetching chart should not force refresh. (#3822)

This commit is contained in:
Grace Guo
2017-11-09 21:48:05 -08:00
committed by GitHub
parent d663bea5e6
commit 6c52f2ff72

View File

@@ -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(),