Dev/brih/task/make dropdowns searchable (#15615)

* make dropdown controls editable, searchable

* updte method name and return type

* update error message, and dropdown index selection logic

* address review feedback
This commit is contained in:
brian-harris
2021-06-07 17:55:08 -07:00
committed by GitHub
parent f7dc9ec2be
commit d8b693341e
8 changed files with 171 additions and 84 deletions

View File

@@ -12,6 +12,7 @@ import * as os from 'os';
import { azureResource } from 'azureResource';
import { IntergrationRuntimePage } from '../../wizard/integrationRuntimePage';
import { IconPathHelper } from '../../constants/iconPathHelper';
import { selectDropDownIndex } from '../../api/utils';
export class CreateSqlMigrationServiceDialog {
@@ -174,7 +175,9 @@ export class CreateSqlMigrationServiceDialog {
}).component();
this.migrationServiceResourceGroupDropdown = this._view.modelBuilder.dropDown().withProps({
required: true
required: true,
editable: true,
fireOnTextChange: true,
}).component();
const migrationServiceNameLabel = this._view.modelBuilder.text().withProps({
@@ -252,7 +255,7 @@ export class CreateSqlMigrationServiceDialog {
private async populateSubscriptions(): Promise<void> {
this.migrationServiceResourceGroupDropdown.loading = true;
this.migrationServiceSubscription.value = this.migrationStateModel._targetSubscription.name;
this.populateResourceGroups();
await this.populateResourceGroups();
}
private async populateResourceGroups(): Promise<void> {
@@ -276,6 +279,7 @@ export class CreateSqlMigrationServiceDialog {
];
}
this.migrationServiceResourceGroupDropdown.values = resourceGroupDropdownValues;
selectDropDownIndex(this.migrationServiceResourceGroupDropdown, 0);
this.migrationServiceResourceGroupDropdown.loading = false;
}