added a clear organization method inside vault-filter service (#9786)
This commit is contained in:
parent
d7d35a9e2f
commit
1826403d8d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue