mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
QueryEditorRow: filter data on mount (#54260)
This works correctly on initial dashboard load. However, when an action is taken that triggers a "re-mount", e.g. opening the options pane on the right side of the page, the `data` prop becomes undefined.
This commit is contained in:
parent
d574a5d98f
commit
87375f570d
@ -82,6 +82,10 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const { data, query } = this.props;
|
||||||
|
const dataFilteredByRefId = filterPanelDataToQuery(data, query.refId);
|
||||||
|
this.setState({ data: dataFilteredByRefId });
|
||||||
|
|
||||||
this.loadDatasource();
|
this.loadDatasource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user