How to filter a DOM DataTable
How to filter a DOM DataTable
Emyleen
Posts: 21Questions: 8Answers: 0
Hello! I want to filter my DataTable with a DOM comparison. I do that but my DataTable doesn't draw.
$datatable.DataTable().search(search).column(2).data().filter(function(value, index){
if(typelist != 'all' && set != 'all')
return $($datatable.DataTable().cell(index,2).node()).data("type") == typelist && $($datatable.DataTable().cell(index,3).node()).data("set") == set;
if(typelist == 'all' && set != 'all')
return $($datatable.DataTable().cell(index,3).node()).data("set") == set;
if(typelist != 'all' && set == 'all')
return $($datatable.DataTable().cell(index,2).node()).data("type") == typelist;
}).draw();
Do you have an idea? Thanks!
This discussion has been closed.
Answers
up?
I still have my filter problem, if someone finds a solution or can explain how filter() works that would be great!