added a clear organization method inside vault-filter service (#9786)

This commit is contained in:
Jason Ng 2024-06-24 15:30:04 -04:00 committed by GitHub
parent d7d35a9e2f
commit 1826403d8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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) {