diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts index 3f8a0fb99d..836cba2201 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts @@ -32,4 +32,5 @@ export abstract class VaultFilterService { ) => Observable>; // TODO: Remove this from org vault when collection admin service adopts state management reloadCollections?: (collections: CollectionAdminView[]) => void; + clearOrganizationFilter: () => void; } diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts index 6bedac5bb6..36cde762a0 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts @@ -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); diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index ae3a065778..4b290a1c17 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -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) {