提交 550ecb8b 编写于 作者: S Sandeep Somavarapu

enable clear action when there is a value in the beginning

上级 7053345a
......@@ -1500,10 +1500,11 @@ export class ClearExtensionsInputAction extends Action {
id: string,
label: string,
onSearchChange: Event<string>,
value: string,
@IViewletService private readonly viewletService: IViewletService
) {
super(id, label, 'clear-extensions', true);
this.enabled = false;
this.onSearchChange(value);
onSearchChange(this.onSearchChange, this, this.disposables);
}
......
......@@ -400,7 +400,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio
getActions(): IAction[] {
if (!this.primaryActions) {
this.primaryActions = [
this.instantiationService.createInstance(ClearExtensionsInputAction, ClearExtensionsInputAction.ID, ClearExtensionsInputAction.LABEL, this.onSearchChange)
this.instantiationService.createInstance(ClearExtensionsInputAction, ClearExtensionsInputAction.ID, ClearExtensionsInputAction.LABEL, this.onSearchChange, this.searchBox.getValue())
];
}
return this.primaryActions;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册