mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: keep enabled/disabled state in angular based QueryEditors correctly (#31558)
* Explore: handle query.hide changes in angular-based query editors * simplify code, no need for custom "this"
This commit is contained in:
@@ -40,6 +40,12 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
||||
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);
|
||||
|
Reference in New Issue
Block a user