Custom filtering function for columns with the 1.10 API?
Custom filtering function for columns with the 1.10 API?
BraedenP
Posts: 1Questions: 1Answers: 0
Text-based filtering couldn't be easier with the new API.
A simple invocation of the following chain filters a particular column:
table.column(i).search('term').draw()
Is it possible to apply a custom filter function in this way? Ideally, something along the lines of:
table.column(i).filter(function (value, index) {
// evaluate and return true or false
}).draw();
I realize that there exists a filter() helper function that consumes an evaluator function, but I'm looking for some way to actively filter the table, not just the raw data.
This discussion has been closed.
Answers
Currently no - but that is a very nice idea. Filtering is DataTables weak spot (now that the API has been sorted out) and a method like this would really help. I've added it to my ideas list for filtering.
Allan