filter(searchstatus){
$.fn['dataTable'].ext.search.push((data:any) => {
console.log(data[0])
const status = data[0] ; // use data for the id column
if (searchstatus == status ) {
return true;
}
return false;
});
}
console.log(data[0]) is printing undefined, and hence getting blank results in datatable
Why I am getting data[0] undefined here. I am searching for first column so I have written data[0], and same is provided in documentation example.
I have written external search filter as below
filter(searchstatus){ $.fn['dataTable'].ext.search.push((data:any) => { console.log(data[0]) const status = data[0] ; // use data for the id column if (searchstatus == status ) { return true; } return false; }); }
console.log(data[0]) is printing undefined, and hence getting blank results in datatable
Why I am getting data[0] undefined here. I am searching for first column so I have written data[0], and same is provided in documentation example.