diff --git a/packages/grafana-data/src/types/datasource.ts b/packages/grafana-data/src/types/datasource.ts index ab946895093..6fcf9b10452 100644 --- a/packages/grafana-data/src/types/datasource.ts +++ b/packages/grafana-data/src/types/datasource.ts @@ -382,6 +382,7 @@ export interface QueryEditorProps< onRunQuery: () => void; onChange: (value: TVQuery) => void; onBlur?: () => void; + onAddQuery?: (query: TQuery) => void; /** * Contains query response filtered by refId of QueryResultBase and possible query error */ diff --git a/public/app/features/query/components/QueryEditorRow.tsx b/public/app/features/query/components/QueryEditorRow.tsx index 360c2ffa24c..73c8f5b56a2 100644 --- a/public/app/features/query/components/QueryEditorRow.tsx +++ b/public/app/features/query/components/QueryEditorRow.tsx @@ -230,7 +230,7 @@ export class QueryEditorRow extends PureComponent { - const { query, onChange, queries, onRunQuery, app = CoreApp.PanelEditor, history } = this.props; + const { query, onChange, queries, onRunQuery, onAddQuery, app = CoreApp.PanelEditor, history } = this.props; const { datasource, data } = this.state; if (datasource?.components?.QueryCtrl) { @@ -248,6 +248,7 @@ export class QueryEditorRow extends PureComponent