summaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-13 00:05:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-13 00:05:01 +0000
commit254165343f2469c80a3ca3a356af97bac2cb1d66 (patch)
treeaa36d4c6f28ddf9d33476c71f3dcbf8328021c8c /cds-ui
parente767206483553cab2127e5094fb5e430e62598ca (diff)
parent76f6f9a24ffba86183ea185c19cb9e49820cda4f (diff)
Merge "search sourecs options issue fixed"
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/client/src/app/common/shared/pipes/search.pipe.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
index f5092aff3..092531ee3 100644
--- a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
+++ b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
@@ -26,12 +26,11 @@ import { Pipe, PipeTransform } from '@angular/core';
export class SearchPipe implements PipeTransform{
- transform(items: any[], searchText: string): any[] {
- if(!items) return [];
- if(!searchText) return items;
- searchText = searchText.toLowerCase();
- return items.filter( it => {
- return it.toLowerCase().includes(searchText);
- });
- }
+ transform(item: any, searchText: any): any {
+ if(searchText == null) return item;
+
+ return item.filter(function(search){
+ return search.type.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
+ })
+ }
} \ No newline at end of file