add more specific label for dropdown (#1544)

This commit is contained in:
Anthony Dresser
2018-06-05 11:36:19 -07:00
committed by GitHub
parent 628e2adc64
commit aef7244939
2 changed files with 3 additions and 4 deletions

View File

@@ -9,11 +9,10 @@ import * as nls from 'vs/nls';
export class ToggleDropdownAction extends Action {
private static readonly ID = 'dropdownAction.toggle';
private static readonly LABEL = nls.localize('dropdownAction.toggle', "Toggle dropdown");
private static readonly ICON = 'dropdown-arrow';
constructor(private _fn: () => any) {
super(ToggleDropdownAction.ID, ToggleDropdownAction.LABEL, ToggleDropdownAction.ICON);
constructor(label, private _fn: () => any) {
super(ToggleDropdownAction.ID, label, ToggleDropdownAction.ICON);
}
public run(): TPromise<boolean> {

View File

@@ -115,7 +115,7 @@ export class Dropdown extends Disposable {
this.$input = $('.dropdown-input').style('width', '100%').appendTo(this.$el);
this.$treeContainer = $('.dropdown-tree');
this._toggleAction = new ToggleDropdownAction(() => {
this._toggleAction = new ToggleDropdownAction(nls.localize('dropdown.toggle', '{0} Toggle Dropdown', this._options.ariaLabel), () => {
this._showList();
this._tree.domFocus();
this._tree.focusFirst();