[hotfix] fixing the build

This commit is contained in:
Maxime Beauchemin
2017-04-13 15:58:04 -07:00
parent 6c68a21e4f
commit c43a9fd554
4 changed files with 24 additions and 36 deletions

View File

@@ -28,26 +28,6 @@ export default class DisplayQueryButton extends React.PureComponent {
this.beforeOpen = this.beforeOpen.bind(this);
this.fetchQuery = this.fetchQuery.bind(this);
}
fetchQuery() {
this.setState({ isLoading: true });
$.ajax({
type: 'GET',
url: this.props.queryEndpoint,
success: data => {
this.setState({
language: data.language,
query: data.query,
isLoading: false,
});
},
error: data => {
this.setState({
error: data.error,
isLoading: false,
});
},
});
}
setStateFromQueryResponse() {
const qr = this.props.queryResponse;
this.setState({
@@ -56,6 +36,26 @@ export default class DisplayQueryButton extends React.PureComponent {
isLoading: false,
});
}
fetchQuery() {
this.setState({ isLoading: true });
$.ajax({
type: 'GET',
url: this.props.queryEndpoint,
success: (data) => {
this.setState({
language: data.language,
query: data.query,
isLoading: false,
});
},
error: (data) => {
this.setState({
error: data.error,
isLoading: false,
});
},
});
}
beforeOpen() {
if (this.props.chartStatus === 'loading' || this.props.chartStatus === null) {
this.fetchQuery();