From 272ce2330c80dcc3505772b07155c4ff80d9aab1 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 10 Jul 2020 15:18:00 -0500 Subject: [PATCH] Added custom field consideration to basic search function --- src/services/search.service.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/services/search.service.ts b/src/services/search.service.ts index a7149cafba..b6041c72fa 100644 --- a/src/services/search.service.ts +++ b/src/services/search.service.ts @@ -164,6 +164,20 @@ export class SearchService implements SearchServiceAbstraction { if (c.login && c.login.uri != null && c.login.uri.toLowerCase().indexOf(query) > -1) { return true; } + + + if(c.hasFields){ + for (let field of c.fields) { + if (field.value.toLowerCase().indexOf(query) > -1) { + return true; + } + + if(field.name.toLowerCase().indexOf(query) > -1) { + return true; + } + } + } + return false; }); }