mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-10 13:09:37 +01:00
dont apply old pipe search during select all filter
This commit is contained in:
parent
066ab1500f
commit
58baf137aa
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit 5609fecbcee6d0608ea28985c31688511e735a59
|
Subproject commit 9283a29d35a18f058f3c84f8aaa919b911f1940a
|
@ -20,8 +20,6 @@ import { CipherType } from 'jslib/enums/cipherType';
|
|||||||
|
|
||||||
import { CipherView } from 'jslib/models/view/cipherView';
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
|
||||||
import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe';
|
|
||||||
|
|
||||||
const MaxCheckedCount = 500;
|
const MaxCheckedCount = 500;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -37,13 +35,10 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
|
|||||||
cipherType = CipherType;
|
cipherType = CipherType;
|
||||||
actionPromise: Promise<any>;
|
actionPromise: Promise<any>;
|
||||||
|
|
||||||
private searchPipe: SearchCiphersPipe;
|
|
||||||
|
|
||||||
constructor(searchService: SearchService, protected analytics: Angulartics2,
|
constructor(searchService: SearchService, protected analytics: Angulartics2,
|
||||||
protected toasterService: ToasterService, protected i18nService: I18nService,
|
protected toasterService: ToasterService, protected i18nService: I18nService,
|
||||||
protected platformUtilsService: PlatformUtilsService, protected cipherService: CipherService) {
|
protected platformUtilsService: PlatformUtilsService, protected cipherService: CipherService) {
|
||||||
super(searchService);
|
super(searchService);
|
||||||
this.searchPipe = new SearchCiphersPipe(platformUtilsService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@ -58,14 +53,9 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
|
|||||||
if (select) {
|
if (select) {
|
||||||
this.selectAll(false);
|
this.selectAll(false);
|
||||||
}
|
}
|
||||||
let filteredCiphers = this.ciphers;
|
const selectCount = select && this.ciphers.length > MaxCheckedCount ? MaxCheckedCount : this.ciphers.length;
|
||||||
if (select) {
|
|
||||||
filteredCiphers = this.searchPipe.transform(this.ciphers, this.searchText);
|
|
||||||
}
|
|
||||||
const selectCount = select && filteredCiphers.length > MaxCheckedCount ?
|
|
||||||
MaxCheckedCount : filteredCiphers.length;
|
|
||||||
for (let i = 0; i < selectCount; i++) {
|
for (let i = 0; i < selectCount; i++) {
|
||||||
this.checkCipher(filteredCiphers[i], select);
|
this.checkCipher(this.ciphers[i], select);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user