mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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._resourceGroup = undefined!;
|
||||||
this.migrationStateModel._targetServerInstance = undefined!;
|
this.migrationStateModel._targetServerInstance = undefined!;
|
||||||
|
|
||||||
const clearDropDown = async (dropDown: azdata.DropDownComponent): Promise<void> => {
|
this._clearDropDown(this._azureAccountsDropdown);
|
||||||
dropDown.values = [];
|
this._clearDropDown(this._accountTenantDropdown);
|
||||||
dropDown.value = undefined;
|
this._clearDropDown(this._azureSubscriptionDropdown);
|
||||||
};
|
this._clearDropDown(this._azureLocationDropdown);
|
||||||
await clearDropDown(this._azureAccountsDropdown);
|
this._clearDropDown(this._azureResourceGroupDropdown);
|
||||||
await clearDropDown(this._accountTenantDropdown);
|
this._clearDropDown(this._azureResourceDropdown);
|
||||||
await clearDropDown(this._azureSubscriptionDropdown);
|
|
||||||
await clearDropDown(this._azureLocationDropdown);
|
|
||||||
await clearDropDown(this._azureResourceGroupDropdown);
|
|
||||||
await clearDropDown(this._azureResourceDropdown);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.populateAzureAccountsDropdown();
|
await this.populateAzureAccountsDropdown();
|
||||||
@@ -416,6 +412,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
|||||||
: undefined!;
|
: undefined!;
|
||||||
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
||||||
}
|
}
|
||||||
|
this._clearDropDown(this._azureLocationDropdown);
|
||||||
await this.populateLocationDropdown();
|
await this.populateLocationDropdown();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -446,6 +443,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
|||||||
: undefined!;
|
: undefined!;
|
||||||
}
|
}
|
||||||
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
this.migrationStateModel.refreshDatabaseBackupPage = true;
|
||||||
|
this._clearDropDown(this._azureResourceGroupDropdown);
|
||||||
await this.populateResourceGroupDropdown();
|
await this.populateResourceGroupDropdown();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -672,6 +670,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
|||||||
? utils.deepClone(selectedResourceGroup)!
|
? utils.deepClone(selectedResourceGroup)!
|
||||||
: undefined!;
|
: undefined!;
|
||||||
}
|
}
|
||||||
|
this._clearDropDown(this._azureResourceDropdown);
|
||||||
await this.populateResourceInstanceDropdown();
|
await this.populateResourceInstanceDropdown();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -1208,4 +1207,9 @@ export class TargetSelectionPage extends MigrationWizardPage {
|
|||||||
targetDatabaseCollation.length > 0 &&
|
targetDatabaseCollation.length > 0 &&
|
||||||
sourceDatabaseCollation.toLocaleLowerCase() === targetDatabaseCollation.toLocaleLowerCase();
|
sourceDatabaseCollation.toLocaleLowerCase() === targetDatabaseCollation.toLocaleLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _clearDropDown(dropDown: azdata.DropDownComponent): void {
|
||||||
|
dropDown.values = [];
|
||||||
|
dropDown.value = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user