From c2bdabc0987a4cae6c64b62a43bb122e850fc02b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 12 Apr 2018 15:42:22 -0400 Subject: [PATCH] only search name on edge --- src/angular/pipes/search-ciphers.pipe.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/angular/pipes/search-ciphers.pipe.ts b/src/angular/pipes/search-ciphers.pipe.ts index 1d255885ca..0ffb12b52a 100644 --- a/src/angular/pipes/search-ciphers.pipe.ts +++ b/src/angular/pipes/search-ciphers.pipe.ts @@ -5,10 +5,18 @@ import { import { CipherView } from '../../models/view/cipherView'; +import { PlatformUtilsService } from '../../abstractions/platformUtils.service'; + @Pipe({ name: 'searchCiphers', }) export class SearchCiphersPipe implements PipeTransform { + private onlySearchName = false; + + constructor(private platformUtilsService: PlatformUtilsService) { + this.onlySearchName = platformUtilsService.isEdge(); + } + transform(ciphers: CipherView[], searchText: string): CipherView[] { if (ciphers == null || ciphers.length === 0) { return []; @@ -23,6 +31,9 @@ export class SearchCiphersPipe implements PipeTransform { if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) { return true; } + if (this.onlySearchName) { + return false; + } if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(searchText) > -1) { return true; }