mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fixed 'UI hanging on clearing dropdown error' for database backup page (#16541)
This PR fixes ADS UI - Clear resource group drop down box and click Next on the Database Backup Wizard - Cannot read property 'displayName' ERROR
This commit is contained in:
@@ -573,12 +573,14 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
|||||||
'font-weight': 'bold'
|
'font-weight': 'bold'
|
||||||
}
|
}
|
||||||
}).component();
|
}).component();
|
||||||
this._networkShareStorageAccountResourceGroupDropdown = this._view.modelBuilder.dropDown().withProps({
|
this._networkShareStorageAccountResourceGroupDropdown = this._view.modelBuilder.dropDown()
|
||||||
ariaLabel: constants.RESOURCE_GROUP,
|
.withProps({
|
||||||
width: WIZARD_INPUT_COMPONENT_WIDTH,
|
required: true,
|
||||||
editable: true,
|
ariaLabel: constants.RESOURCE_GROUP,
|
||||||
fireOnTextChange: true,
|
width: WIZARD_INPUT_COMPONENT_WIDTH,
|
||||||
}).component();
|
editable: true,
|
||||||
|
fireOnTextChange: true,
|
||||||
|
}).component();
|
||||||
this._disposables.push(this._networkShareStorageAccountResourceGroupDropdown.onValueChanged(async (value) => {
|
this._disposables.push(this._networkShareStorageAccountResourceGroupDropdown.onValueChanged(async (value) => {
|
||||||
const selectedIndex = findDropDownItemIndex(this._networkShareStorageAccountResourceGroupDropdown, value);
|
const selectedIndex = findDropDownItemIndex(this._networkShareStorageAccountResourceGroupDropdown, value);
|
||||||
if (selectedIndex > -1) {
|
if (selectedIndex > -1) {
|
||||||
@@ -883,10 +885,10 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
|||||||
|
|
||||||
switch (this.migrationStateModel._databaseBackup.networkContainerType) {
|
switch (this.migrationStateModel._databaseBackup.networkContainerType) {
|
||||||
case NetworkContainerType.NETWORK_SHARE:
|
case NetworkContainerType.NETWORK_SHARE:
|
||||||
if ((<azdata.CategoryValue>this._networkShareStorageAccountResourceGroupDropdown.value).displayName === constants.RESOURCE_GROUP_NOT_FOUND) {
|
if ((<azdata.CategoryValue>this._networkShareStorageAccountResourceGroupDropdown.value)?.displayName === constants.RESOURCE_GROUP_NOT_FOUND) {
|
||||||
errors.push(constants.INVALID_RESOURCE_GROUP_ERROR);
|
errors.push(constants.INVALID_RESOURCE_GROUP_ERROR);
|
||||||
}
|
}
|
||||||
if ((<azdata.CategoryValue>this._networkShareContainerStorageAccountDropdown.value).displayName === constants.NO_STORAGE_ACCOUNT_FOUND) {
|
if ((<azdata.CategoryValue>this._networkShareContainerStorageAccountDropdown.value)?.displayName === constants.NO_STORAGE_ACCOUNT_FOUND) {
|
||||||
errors.push(constants.INVALID_STORAGE_ACCOUNT_ERROR);
|
errors.push(constants.INVALID_STORAGE_ACCOUNT_ERROR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user