column filtering with a custom function

column filtering with a custom function

chihleechihlee Posts: 1Questions: 1Answers: 0

It seems that the example given here won't work if there is more than one table:
https://next.datatables.net/examples/plug-ins/range_filtering.html

It would be nice if we can do something like:

table
.column(colIdx)
.search( function (cell) { return +cell > 0; } )
.draw();

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Agreed. The filtering in DataTables really needs work. It is possible to use the filtering given in the example, but you need to check if you are operating on the correct table or not (use settings.nTable.id to get the table id).

    Allan

This discussion has been closed.