mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +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>>;
|
) => Observable<TreeNode<CipherTypeFilter>>;
|
||||||
// TODO: Remove this from org vault when collection admin service adopts state management
|
// TODO: Remove this from org vault when collection admin service adopts state management
|
||||||
reloadCollections?: (collections: CollectionAdminView[]) => void;
|
reloadCollections?: (collections: CollectionAdminView[]) => void;
|
||||||
|
clearOrganizationFilter: () => void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ export class VaultFilterService implements VaultFilterServiceAbstraction {
|
|||||||
return this._organizationFilter;
|
return this._organizationFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearOrganizationFilter() {
|
||||||
|
this._organizationFilter.next(null);
|
||||||
|
}
|
||||||
|
|
||||||
setOrganizationFilter(organization: Organization) {
|
setOrganizationFilter(organization: Organization) {
|
||||||
if (organization?.id != "AllVaults") {
|
if (organization?.id != "AllVaults") {
|
||||||
this._organizationFilter.next(organization);
|
this._organizationFilter.next(organization);
|
||||||
|
|||||||
@@ -394,6 +394,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
||||||
this.destroy$.next();
|
this.destroy$.next();
|
||||||
this.destroy$.complete();
|
this.destroy$.complete();
|
||||||
|
this.vaultFilterService.clearOrganizationFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onVaultItemsEvent(event: VaultItemEvent) {
|
async onVaultItemsEvent(event: VaultItemEvent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user