mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
fix bug in dropdown auto-selection (#21977)
This commit is contained in:
@@ -266,16 +266,12 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
||||
this.migrationStateModel._resourceGroup = undefined!;
|
||||
this.migrationStateModel._targetServerInstance = undefined!;
|
||||
|
||||
const clearDropDown = async (dropDown: azdata.DropDownComponent): Promise<void> => {
|
||||
dropDown.values = [];
|
||||
dropDown.value = undefined;
|
||||
};
|
||||
await clearDropDown(this._azureAccountsDropdown);
|
||||
await clearDropDown(this._accountTenantDropdown);
|
||||
await clearDropDown(this._azureSubscriptionDropdown);
|
||||
await clearDropDown(this._azureLocationDropdown);
|
||||
await clearDropDown(this._azureResourceGroupDropdown);
|
||||
await clearDropDown(this._azureResourceDropdown);
|
||||
this._clearDropDown(this._azureAccountsDropdown);
|
||||
this._clearDropDown(this._accountTenantDropdown);
|
||||
this._clearDropDown(this._azureSubscriptionDropdown);
|
||||
this._clearDropDown(this._azureLocationDropdown);
|
||||
this._clearDropDown(this._azureResourceGroupDropdown);
|
||||
this._clearDropDown(this._azureResourceDropdown);
|
||||
}
|
||||
|
||||
await this.populateAzureAccountsDropdown();
|
||||
@@ -416,6 +412,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
||||
: undefined!;
|
||||
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
||||
}
|
||||
this._clearDropDown(this._azureLocationDropdown);
|
||||
await this.populateLocationDropdown();
|
||||
}));
|
||||
|
||||
@@ -446,6 +443,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
||||
: undefined!;
|
||||
}
|
||||
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
||||
this._clearDropDown(this._azureResourceGroupDropdown);
|
||||
await this.populateResourceGroupDropdown();
|
||||
}));
|
||||
|
||||
@@ -672,6 +670,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
||||
? utils.deepClone(selectedResourceGroup)!
|
||||
: undefined!;
|
||||
}
|
||||
this._clearDropDown(this._azureResourceDropdown);
|
||||
await this.populateResourceInstanceDropdown();
|
||||
}));
|
||||
|
||||
@@ -1208,4 +1207,9 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
||||
targetDatabaseCollation.length > 0 &&
|
||||
sourceDatabaseCollation.toLocaleLowerCase() === targetDatabaseCollation.toLocaleLowerCase();
|
||||
}
|
||||
|
||||
private _clearDropDown(dropDown: azdata.DropDownComponent): void {
|
||||
dropDown.values = [];
|
||||
dropDown.value = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user