Update default values for Owner and Collation in Create Database dialog (#23332)

This commit is contained in:
Cory Rivera
2023-06-07 09:47:16 -07:00
committed by GitHub
parent a1ab537094
commit 9dcb7e4ee5
2 changed files with 3 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ export class DatabaseDialog extends ObjectManagementDialogBase<ObjectManagement.
containers.push(this.createLabelInputContainer(localizedConstants.NameText, this._nameInput));
if (this.viewInfo.loginNames?.length > 0) {
this.objectInfo.owner = this.viewInfo.loginNames[0];
let ownerDropbox = this.createDropdown(localizedConstants.OwnerText, async () => {
this.objectInfo.owner = ownerDropbox.value as string;
}, this.viewInfo.loginNames, this.viewInfo.loginNames[0]);
@@ -47,6 +48,7 @@ export class DatabaseDialog extends ObjectManagementDialogBase<ObjectManagement.
private initializeOptionsSection(): azdata.GroupContainer {
let containers: azdata.Component[] = [];
if (this.viewInfo.collationNames?.length > 0) {
this.objectInfo.collationName = this.viewInfo.collationNames[0];
let collationDropbox = this.createDropdown(localizedConstants.CollationText, async () => {
this.objectInfo.collationName = collationDropbox.value as string;
}, this.viewInfo.collationNames, this.viewInfo.collationNames[0]);