diff --git a/src/main/webapp/app/table-screen-es/table-screen-es.component.ts b/src/main/webapp/app/table-screen-es/table-screen-es.component.ts index 2ab9289..67f10bf 100644 --- a/src/main/webapp/app/table-screen-es/table-screen-es.component.ts +++ b/src/main/webapp/app/table-screen-es/table-screen-es.component.ts @@ -72,8 +72,11 @@ export class TableScreenEsComponent implements OnInit, AfterViewInit, OnChanges this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => { this.dataFromService = res; this.dataSource.data = res; - console.debug(res); - + //this is to filter only on the 'name' property + this.dataSource.filterPredicate = function (record:any,filter:string) { + return record.name.indexOf(filter)!==-1; + } + //console.debug(res); }); } diff --git a/src/main/webapp/app/table-screen/table-screen.component.ts b/src/main/webapp/app/table-screen/table-screen.component.ts index 22bfae5..6b09173 100644 --- a/src/main/webapp/app/table-screen/table-screen.component.ts +++ b/src/main/webapp/app/table-screen/table-screen.component.ts @@ -72,10 +72,14 @@ export class TableScreenComponent implements OnInit, AfterViewInit, OnChanges { this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => { this.dataFromService = res; this.dataSource.data = res; - // console.debug("*****TABLE DATA*****"); - // console.debug(res); - // console.debug("*****END*****"); - + //this is to filter only on the 'name' property + this.dataSource.filterPredicate = function (record:any,filter:string) { + return record.name.indexOf(filter)!==-1; + } + /* + this.dataSource.filterPredicate = + (data: IHostingNode, filter: string) => !filter || data.level == filter; + */ }); } @@ -101,7 +105,7 @@ export class TableScreenComponent implements OnInit, AfterViewInit, OnChanges { this.dataSource.filter = filterValue.trim().toLowerCase(); } - // per tabbed pane (versione con aggiunta dinamica) + // for the dynamic tabbed pane removeTab(index: number): void { this.tabs.splice(index, 1);