I\'ve been trying to get this working with no luck. I\'ve been referencing these resources for help:
http://swimlane.github.io/ngx-datatable/#filter
https://github.com/swiml
import { DatatableComponent } from '@swimlane/ngx-datatable';
ViewChild(DatatableComponent) table: DatatableComponent;
updateFilter(event) {
const val = event.target.value.toLowerCase();
var returnData: any;
// filter our data
const temp = this.temp.filter(function (d) {
if (d.yourFirstColumnName.toLowerCase().indexOf(val) !== -1 || !val) {
returnData = d.user_name.toLowerCase().indexOf(val) !== -1 || !val;
} else if (d.yourSecondColumnName.toLowerCase().indexOf(val) !== -1 || !val) {
returnData = d.notes_title.toLowerCase().indexOf(val) !== -1 || !val;
}
return returnData;
});