From e25ad93082c7a9f4db46b84e67d1403996337bcc Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 6 Jul 2018 14:11:47 -0400 Subject: [PATCH] trim search term --- src/angular/pipes/search-ciphers.pipe.ts | 2 +- src/angular/pipes/search.pipe.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/angular/pipes/search-ciphers.pipe.ts b/src/angular/pipes/search-ciphers.pipe.ts index 0ffb12b52a..848f8519e7 100644 --- a/src/angular/pipes/search-ciphers.pipe.ts +++ b/src/angular/pipes/search-ciphers.pipe.ts @@ -26,7 +26,7 @@ export class SearchCiphersPipe implements PipeTransform { return ciphers; } - searchText = searchText.toLowerCase(); + searchText = searchText.trim().toLowerCase(); return ciphers.filter((c) => { if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) { return true; diff --git a/src/angular/pipes/search.pipe.ts b/src/angular/pipes/search.pipe.ts index c71ab3a8b1..5de3d5c50b 100644 --- a/src/angular/pipes/search.pipe.ts +++ b/src/angular/pipes/search.pipe.ts @@ -16,7 +16,7 @@ export class SearchPipe implements PipeTransform { return items; } - searchText = searchText.toLowerCase(); + searchText = searchText.trim().toLowerCase(); return items.filter((i) => { if (prop1 != null && i[prop1] != null && i[prop1].toString().toLowerCase().indexOf(searchText) > -1) { return true;