mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Fix enabling of disabled queries when editing in dashboard (#31055)
* Fix disable bug by passing hide prop * Make more universal fix * Revert to original fix * Update public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
This commit is contained in:
parent
38daf0cba6
commit
4f61edd28d
@ -92,7 +92,9 @@ export class PromQueryEditor extends PureComponent<Props, State> {
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user