Skip to content

Commit 0a536f0

Browse files
author
wtao
committed
bug fixing
1 parent 5907d62 commit 0a536f0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

frontend/src/components/QueryEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function QueryEditor(props: Props) {
5858
});
5959
const values = await lastValueFrom(response);
6060
const collections = values.data;
61-
if (collections.length > 0) {
61+
if (!collection && collections.length > 0) {
6262
onChange({ ...query, collection: collections[0] });
6363
}
6464
setCollections(collections);

frontend/src/datasource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
3838

3939
getDefaultQuery(_: CoreApp): Partial<MyQuery> {
4040
return {
41+
collection: '',
4142
queryText: '',
4243
queryType: QueryType.timeserie,
4344
};

0 commit comments

Comments
 (0)