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

@ -1 +1 @@
Subproject commit 5609fecbcee6d0608ea28985c31688511e735a59
Subproject commit 9283a29d35a18f058f3c84f8aaa919b911f1940a

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);
}
}