1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00

dont apply old pipe search during select all filter

This commit is contained in:
Kyle Spearrin
2018-12-08 10:47:22 -05:00
parent 066ab1500f
commit 58baf137aa
2 changed files with 3 additions and 13 deletions

2
jslib

Submodule jslib updated: 5609fecbce...9283a29d35

View File

@@ -20,8 +20,6 @@ import { CipherType } from 'jslib/enums/cipherType';
import { CipherView } from 'jslib/models/view/cipherView';
import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe';
const MaxCheckedCount = 500;
@Component({
@@ -37,13 +35,10 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
cipherType = CipherType;
actionPromise: Promise<any>;
private searchPipe: SearchCiphersPipe;
constructor(searchService: SearchService, protected analytics: Angulartics2,
protected toasterService: ToasterService, protected i18nService: I18nService,
protected platformUtilsService: PlatformUtilsService, protected cipherService: CipherService) {
super(searchService);
this.searchPipe = new SearchCiphersPipe(platformUtilsService);
}
ngOnDestroy() {
@@ -58,14 +53,9 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
if (select) {
this.selectAll(false);
}
let filteredCiphers = this.ciphers;
if (select) {
filteredCiphers = this.searchPipe.transform(this.ciphers, this.searchText);
}
const selectCount = select && filteredCiphers.length > MaxCheckedCount ?
MaxCheckedCount : filteredCiphers.length;
const selectCount = select && this.ciphers.length > MaxCheckedCount ? MaxCheckedCount : this.ciphers.length;
for (let i = 0; i < selectCount; i++) {
this.checkCipher(filteredCiphers[i], select);
this.checkCipher(this.ciphers[i], select);
}
}