diff --git a/public/app/plugins/datasource/testdata/query_ctrl.ts b/public/app/plugins/datasource/testdata/query_ctrl.ts index dad3cdc6f6f..48bfa3bb605 100644 --- a/public/app/plugins/datasource/testdata/query_ctrl.ts +++ b/public/app/plugins/datasource/testdata/query_ctrl.ts @@ -88,8 +88,6 @@ export class TestDataQueryCtrl extends QueryCtrl { scenarioChanged() { this.scenario = _.find(this.scenarioList, { id: this.target.scenarioId }); - this.target.stringInput = this.scenario.stringInput; - this.showLabels = showLabelsFor.includes(this.target.scenarioId); if (this.target.scenarioId === 'manual_entry') { this.target.points = this.target.points || []; @@ -121,6 +119,9 @@ export class TestDataQueryCtrl extends QueryCtrl { delete this.target.stringInput; } + this.target.stringInput = this.scenario.stringInput ?? undefined; + this.showLabels = showLabelsFor.includes(this.target.scenarioId); + this.refresh(); }