1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-18 14:15:03 +02:00

apply filters on org vault

This commit is contained in:
Kyle Spearrin 2018-08-13 16:38:21 -04:00
parent c71a432ce4
commit e8ac2b561a

View File

@ -78,10 +78,14 @@ export class CiphersComponent extends BaseCiphersComponent {
return super.search(timeout);
}
this.searchPending = false;
let filteredCiphers = this.allCiphers;
if (this.filter != null) {
filteredCiphers = filteredCiphers.filter(this.filter);
}
if (this.searchText == null || this.searchText.trim().length < 2) {
this.ciphers = this.allCiphers;
this.ciphers = filteredCiphers;
} else {
this.ciphers = this.searchService.searchCiphersBasic(this.allCiphers, this.searchText);
this.ciphers = this.searchService.searchCiphersBasic(filteredCiphers, this.searchText);
}
}