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.
(cherry picked from commit 87375f570d)
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
This commit is contained in:
co-authored by
Adam Simpson
parent
565969cfcf
commit
b4a8496b06
@@ -82,6 +82,10 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
const { data, query } = this.props;
|
||||
const dataFilteredByRefId = filterPanelDataToQuery(data, query.refId);
|
||||
this.setState({ data: dataFilteredByRefId });
|
||||
|
||||
this.loadDatasource();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user