Custom filtering function for columns with the 1.10 API?

Custom filtering function for columns with the 1.10 API?

BraedenPBraedenP Posts: 1Questions: 1Answers: 0
edited July 2014 in Free community support

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.

Answers

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    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

This discussion has been closed.