Datasources: Use getDefaultQuery in annotations editors (#61870)

+ Add Cloudwatch default annotation
This commit is contained in:
Ida Štambuk
2023-01-30 16:45:03 +01:00
committed by GitHub
parent b6f477ae03
commit f1a2a76897
8 changed files with 106 additions and 11 deletions

View File

@@ -113,4 +113,9 @@ export interface AnnotationSupport<TQuery extends DataQuery = DataQuery, TAnno =
* Specify a custom QueryEditor for the annotation page. If not specified, the standard one will be used
*/
QueryEditor?: ComponentType<AnnotationQueryEditorProps<TQuery>>;
/**
* Define this method if you want to pre-populate the editor with a default query
*/
getDefaultQuery?(): Partial<TQuery>;
}