mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
added a clear organization method inside vault-filter service (#9786)
This commit is contained in:
@@ -32,4 +32,5 @@ export abstract class VaultFilterService {
|
||||
) => Observable<TreeNode<CipherTypeFilter>>;
|
||||
// TODO: Remove this from org vault when collection admin service adopts state management
|
||||
reloadCollections?: (collections: CollectionAdminView[]) => void;
|
||||
clearOrganizationFilter: () => void;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,10 @@ export class VaultFilterService implements VaultFilterServiceAbstraction {
|
||||
return this._organizationFilter;
|
||||
}
|
||||
|
||||
clearOrganizationFilter() {
|
||||
this._organizationFilter.next(null);
|
||||
}
|
||||
|
||||
setOrganizationFilter(organization: Organization) {
|
||||
if (organization?.id != "AllVaults") {
|
||||
this._organizationFilter.next(organization);
|
||||
|
||||
@@ -394,6 +394,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
this.vaultFilterService.clearOrganizationFilter();
|
||||
}
|
||||
|
||||
async onVaultItemsEvent(event: VaultItemEvent) {
|
||||
|
||||
Reference in New Issue
Block a user