diff --git a/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx b/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx index 009616ce03a..3876687ac74 100644 --- a/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx +++ b/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx @@ -92,7 +92,9 @@ export class PromQueryEditor extends PureComponent { onRunQuery = () => { const { query } = this; - this.props.onChange(query); + // Change of query.hide happens outside of this component and is just passed as prop. We have to update it when running queries. + const { hide } = this.props.query; + this.props.onChange({ ...query, hide }); this.props.onRunQuery(); };