From f947271e4b6e1f303c8aafee39ba3eaf8d35ed34 Mon Sep 17 00:00:00 2001 From: jng Date: Thu, 25 Apr 2024 16:15:47 -0400 Subject: [PATCH] update so add access filter resets on org switch, and if addaccess logic will only apply to collections --- apps/web/src/app/vault/org-vault/vault.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 03f94a6836..23385f6237 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -254,6 +254,11 @@ export class VaultComponent implements OnInit, OnDestroy { .pipe(takeUntil(this.destroy$)) .subscribe((activeFilter) => { this.activeFilter = activeFilter; + + // watch the active filters. Only show toggle when viewing the collections filter + if (!this.activeFilter.collectionId) { + this.showAddAccessToggle = false; + } }); this.searchText$ @@ -323,7 +328,7 @@ export class VaultComponent implements OnInit, OnDestroy { const allCiphers$ = organization$.pipe( concatMap(async (organization) => { // If user swaps organization reset the addAccessToggle - if (!this.showAddAccessToggle) { + if (!this.showAddAccessToggle || organization) { this.addAccessToggle(0); } let ciphers;