Skip to content

Commit

Permalink
GH-7103: API for removing toolbar item.
Browse files Browse the repository at this point in the history
Closes #7103.

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta authored and paul-marechal committed Mar 4, 2021
1 parent 734f49f commit 76af952
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/core/src/browser/shell/tab-bar-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,4 +455,11 @@ export class TabBarToolbarRegistry implements FrontendApplicationContribution {
return result;
}

unregisterItem(itemOrId: TabBarToolbarItem | ReactTabBarToolbarItem | string): void {
const id = typeof itemOrId === 'string' ? itemOrId : itemOrId.id;
if (this.items.delete(id)) {
this.fireOnDidChange();
}
}

}

0 comments on commit 76af952

Please sign in to comment.