diff --git a/public/app/features/explore/QueryEditor.tsx b/public/app/features/explore/QueryEditor.tsx index 0d34ee5249e9a..30f876886c19f 100644 --- a/public/app/features/explore/QueryEditor.tsx +++ b/public/app/features/explore/QueryEditor.tsx @@ -41,11 +41,15 @@ export default class QueryEditor extends PureComponent { datasource, target, refresh: () => { - this.props.onQueryChange(target); - this.props.onExecuteQuery(); + setTimeout(() => { + this.props.onQueryChange(target); + this.props.onExecuteQuery(); + }, 1); }, onQueryChange: () => { - this.props.onQueryChange(target); + setTimeout(() => { + this.props.onQueryChange(target); + }, 1); }, events: exploreEvents, panel: { datasource, targets: [target] }, @@ -54,7 +58,9 @@ export default class QueryEditor extends PureComponent { }; this.component = loader.load(this.element, scopeProps, template); - this.props.onQueryChange(target); + setTimeout(() => { + this.props.onQueryChange(target); + }, 1); } componentDidUpdate(prevProps: QueryEditorProps) {