diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/pipes')
-rw-r--r-- | catalog-ui/src/app/ng2/pipes/searchFilter.pipe.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pipes/searchFilter.pipe.ts b/catalog-ui/src/app/ng2/pipes/searchFilter.pipe.ts index 7e017e8590..3a0c85dda2 100644 --- a/catalog-ui/src/app/ng2/pipes/searchFilter.pipe.ts +++ b/catalog-ui/src/app/ng2/pipes/searchFilter.pipe.ts @@ -8,11 +8,10 @@ export class SearchFilterPipe implements PipeTransform { if (!term || !term.length) return value; return value.filter((item) => { if (item.hasOwnProperty(key)) { - let regExp = new RegExp(term, 'gi'); - return regExp.test(item[key]); + return item[key].indexOf(term) > -1; } else { return false; } }); } -}
\ No newline at end of file +} |