Added custom field consideration to basic search function

This commit is contained in:
Addison Beck 2020-07-10 15:18:00 -05:00
parent 7d49902eea
commit 272ce2330c
1 changed files with 14 additions and 0 deletions

View File

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