diff --git a/public/app/features/explore/QueryEditor.tsx b/public/app/features/explore/QueryEditor.tsx index 6e3cf533cc5..f8176d41bc4 100644 --- a/public/app/features/explore/QueryEditor.tsx +++ b/public/app/features/explore/QueryEditor.tsx @@ -29,7 +29,7 @@ export default class QueryEditor extends PureComponent { return; } - const { datasource, initialQuery, exploreEvents } = this.props; + const { datasource, initialQuery, exploreEvents, range } = this.props; const loader = getAngularLoader(); const template = ' '; @@ -38,6 +38,7 @@ export default class QueryEditor extends PureComponent { ctrl: { datasource, target, + range, refresh: () => { setTimeout(() => { // the "hide" attribute of the quries can be changed from the "outside", @@ -79,6 +80,10 @@ export default class QueryEditor extends PureComponent { this.angularScope.toggleEditorMode(); } + if (this.angularScope) { + this.angularScope.range = this.props.range; + } + if (hasNewError || hasToggledEditorMode) { // Some query controllers listen to data error events and need a digest // for some reason this needs to be done in next tick