Editable dropdown component improvement (#13389)

* replace Tree with List

* comments
This commit is contained in:
Alan Ren
2020-11-13 13:36:54 -08:00
committed by GitHub
parent 6b657259a5
commit 99e3da5b48
12 changed files with 203 additions and 323 deletions

View File

@@ -70,8 +70,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
strictSelection: false,
placeholder: '',
maxHeight: 125,
ariaLabel: '',
actionLabel: ''
ariaLabel: ''
};
this._editableDropdown = new Dropdown(this._editableDropDownContainer.nativeElement, this.contextViewService,
dropdownOptions);

View File

@@ -607,8 +607,7 @@ export class ListDatabasesActionItem extends Disposable implements IActionViewIt
this._dropdown = new Dropdown(this._databaseListDropdown, contextViewProvider, {
strictSelection: true,
placeholder: this._selectDatabaseString,
ariaLabel: this._selectDatabaseString,
actionLabel: nls.localize('listDatabases.toggleDatabaseNameDropdown', "Select Database Toggle Dropdown")
ariaLabel: this._selectDatabaseString
});
this._register(this._dropdown.onValueChange(s => this.databaseSelected(s)));
this._register(this._dropdown.onFocus(() => this.onDropdownFocus()));

View File

@@ -161,6 +161,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
this._previousGroupOption = this._serverGroupSelectBox.value;
this._container = DOM.append(container, DOM.$('div.connection-table'));
this._tableContainer = DOM.append(this._container, DOM.$('table.connection-table-content'));
this._tableContainer.setAttribute('role', 'presentation');
this.fillInConnectionForm(authTypeChanged);
this.registerListeners();
if (this._authTypeSelectBox) {
@@ -284,8 +285,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
strictSelection: false,
placeholder: this._defaultDatabaseName,
maxHeight: 125,
ariaLabel: databaseOption.displayName,
actionLabel: localize('connectionWidget.toggleDatabaseNameDropdown', "Select Database Toggle Dropdown")
ariaLabel: databaseOption.displayName
});
}
}

View File

@@ -213,8 +213,7 @@ export class RestoreDialog extends Modal {
this._databaseDropdown = new Dropdown(dropdownContainer, this._contextViewService,
{
strictSelection: false,
ariaLabel: LocalizedStrings.TARGETDATABASE,
actionLabel: localize('restoreDialog.toggleDatabaseNameDropdown', "Select Database Toggle Dropdown")
ariaLabel: LocalizedStrings.TARGETDATABASE
}
);
this._databaseDropdown.onValueChange(s => {