diff --git a/public/app/features/explore/QueryEditor.tsx b/public/app/features/explore/QueryEditor.tsx index 05a852f6a3b..6e3cf533cc5 100644 --- a/public/app/features/explore/QueryEditor.tsx +++ b/public/app/features/explore/QueryEditor.tsx @@ -40,6 +40,12 @@ export default class QueryEditor extends PureComponent { target, refresh: () => { setTimeout(() => { + // the "hide" attribute of the quries can be changed from the "outside", + // it will be applied to "this.props.initialQuery.hide", but not to "target.hide". + // so we have to apply it. + if (target.hide !== this.props.initialQuery.hide) { + target.hide = this.props.initialQuery.hide; + } this.props.onQueryChange?.(target); this.props.onExecuteQuery?.(); }, 1);