diff --git a/extensions/resource-deployment/src/interfaces.ts b/extensions/resource-deployment/src/interfaces.ts index dbf0342604..94d3ac7cfd 100644 --- a/extensions/resource-deployment/src/interfaces.ts +++ b/extensions/resource-deployment/src/interfaces.ts @@ -285,7 +285,7 @@ export interface IOptionsSource { export interface OptionsInfo { values?: string[] | azdata.CategoryValue[], source?: IOptionsSource, - defaultValue: string, + defaultValue: string | ResourceTypeOptionValue, optionsType?: OptionsType } diff --git a/extensions/resource-deployment/src/ui/radioGroupLoadingComponentBuilder.ts b/extensions/resource-deployment/src/ui/radioGroupLoadingComponentBuilder.ts index c115dbdfed..766ebf5d4f 100644 --- a/extensions/resource-deployment/src/ui/radioGroupLoadingComponentBuilder.ts +++ b/extensions/resource-deployment/src/ui/radioGroupLoadingComponentBuilder.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; import * as vscode from 'vscode'; -import { OptionsInfo, FieldInfo, instanceOfDynamicEnablementInfo } from '../interfaces'; +import { OptionsInfo, FieldInfo, instanceOfDynamicEnablementInfo, ResourceTypeOptionValue } from '../interfaces'; import { getErrorMessage } from '../common/utils'; export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilder { @@ -45,7 +45,14 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde } let options: (string[] | azdata.CategoryValue[]) = optionsInfo.values!; - let defaultValue: string = optionsInfo.defaultValue!; + let defaultValue: string | ResourceTypeOptionValue = optionsInfo.defaultValue!; + if (optionsInfo.defaultValue) { + if ((optionsInfo.defaultValue).displayName) { + defaultValue = (optionsInfo.defaultValue).displayName; + } else { + defaultValue = optionsInfo.defaultValue; + } + } options.forEach((op: string | azdata.CategoryValue) => { const option: azdata.CategoryValue = (typeof op === 'string') ? { name: op, displayName: op }