mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
Don't refresh org vault on filter change (#3879)
This commit is contained in:
@@ -166,10 +166,16 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
async applyVaultFilter(vaultFilter: VaultFilter) {
|
async applyVaultFilter(vaultFilter: VaultFilter) {
|
||||||
this.ciphersComponent.showAddNew = vaultFilter.status !== "trash";
|
this.ciphersComponent.showAddNew = vaultFilter.status !== "trash";
|
||||||
this.activeFilter = vaultFilter;
|
this.activeFilter = vaultFilter;
|
||||||
await this.ciphersComponent.reload(
|
|
||||||
this.activeFilter.buildFilter(),
|
// Hack to avoid calling cipherService.getAllFromApiForOrganization every time the vault filter changes.
|
||||||
vaultFilter.status === "trash"
|
// Call CiphersComponent.applyFilter directly instead of going through CiphersComponent.reload, which
|
||||||
);
|
// reloads all the ciphers unnecessarily. Will be fixed properly by EC-14.
|
||||||
|
this.ciphersComponent.loaded = false;
|
||||||
|
this.ciphersComponent.deleted = vaultFilter.status === "trash" || false;
|
||||||
|
await this.ciphersComponent.applyFilter(this.activeFilter.buildFilter());
|
||||||
|
this.ciphersComponent.loaded = true;
|
||||||
|
// End hack
|
||||||
|
|
||||||
this.vaultFilterComponent.searchPlaceholder =
|
this.vaultFilterComponent.searchPlaceholder =
|
||||||
this.vaultService.calculateSearchBarLocalizationString(this.activeFilter);
|
this.vaultService.calculateSearchBarLocalizationString(this.activeFilter);
|
||||||
this.go();
|
this.go();
|
||||||
|
|||||||
Reference in New Issue
Block a user