mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
construct the datasource for the example query if not added (#57936)
This commit is contained in:
parent
3a5ddbfbdf
commit
5a99aff7b8
@ -318,6 +318,10 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
||||
};
|
||||
|
||||
onClickExample = (query: TQuery) => {
|
||||
if (query.datasource === undefined) {
|
||||
query.datasource = { type: this.props.dataSource.type, uid: this.props.dataSource.uid };
|
||||
}
|
||||
|
||||
this.props.onChange({
|
||||
...query,
|
||||
refId: this.props.query.refId,
|
||||
|
Loading…
Reference in New Issue
Block a user