fixed filtering on 'name' only
This commit is contained in:
parent
01b7badfe1
commit
a64bfc97dc
|
@ -72,8 +72,11 @@ export class TableScreenEsComponent implements OnInit, AfterViewInit, OnChanges
|
||||||
this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => {
|
this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => {
|
||||||
this.dataFromService = res;
|
this.dataFromService = res;
|
||||||
this.dataSource.data = 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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,10 +72,14 @@ export class TableScreenComponent implements OnInit, AfterViewInit, OnChanges {
|
||||||
this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => {
|
this.myDataService.fetchResourceImpls('',this.resourceType).subscribe(res => {
|
||||||
this.dataFromService = res;
|
this.dataFromService = res;
|
||||||
this.dataSource.data = res;
|
this.dataSource.data = res;
|
||||||
// console.debug("*****TABLE DATA*****");
|
//this is to filter only on the 'name' property
|
||||||
// console.debug(res);
|
this.dataSource.filterPredicate = function (record:any,filter:string) {
|
||||||
// console.debug("*****END*****");
|
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();
|
this.dataSource.filter = filterValue.trim().toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
// per tabbed pane (versione con aggiunta dinamica)
|
// for the dynamic tabbed pane
|
||||||
|
|
||||||
removeTab(index: number): void {
|
removeTab(index: number): void {
|
||||||
this.tabs.splice(index, 1);
|
this.tabs.splice(index, 1);
|
||||||
|
|
Loading…
Reference in New Issue