Skip to content

Commit 550ecb8

Browse files
committed
enable clear action when there is a value in the beginning
1 parent 7053345 commit 550ecb8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,10 +1500,11 @@ export class ClearExtensionsInputAction extends Action {
15001500
id: string,
15011501
label: string,
15021502
onSearchChange: Event<string>,
1503+
value: string,
15031504
@IViewletService private readonly viewletService: IViewletService
15041505
) {
15051506
super(id, label, 'clear-extensions', true);
1506-
this.enabled = false;
1507+
this.onSearchChange(value);
15071508
onSearchChange(this.onSearchChange, this, this.disposables);
15081509
}
15091510

src/vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio
400400
getActions(): IAction[] {
401401
if (!this.primaryActions) {
402402
this.primaryActions = [
403-
this.instantiationService.createInstance(ClearExtensionsInputAction, ClearExtensionsInputAction.ID, ClearExtensionsInputAction.LABEL, this.onSearchChange)
403+
this.instantiationService.createInstance(ClearExtensionsInputAction, ClearExtensionsInputAction.ID, ClearExtensionsInputAction.LABEL, this.onSearchChange, this.searchBox.getValue())
404404
];
405405
}
406406
return this.primaryActions;

0 commit comments

Comments
 (0)