searchTableView.component: Add '$.fn['dataTable'].ext.search.pop();' command in ngOnDestroy function to reinitialize filtering when re-routing to this page.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52833 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-07-27 23:13:40 +00:00
parent 5ccba9adaf
commit 354c4eb835
1 changed files with 5 additions and 1 deletions

View File

@ -112,14 +112,18 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
if(this.piwiksub){
this.piwiksub.unsubscribe();
}
$.fn['dataTable'].ext.search.pop();
}
ngAfterViewInit(): void {
$.fn['dataTable'].ext.search.push((settings, data, dataIndex) => {
if (this.filterData(data, this.searchUtils.keyword, this.filters)) {
console.info("filter true (keyword:"+this.searchUtils.keyword+")");
return true;
}
console.info("filter false (keyword:"+this.searchUtils.keyword+")");
return false;
});