Column Filtering with Select in Header

Column Filtering with Select in Header

caisyscaisys Posts: 2Questions: 1Answers: 0

I would like to add a filter to one of the columns but in the header not in the footer
I followed the example in

https://datatables.net/examples/api/multi_filter_select.html

And it works perfectly. I changed

.appendTo( $(column.footer()).empty() )

to

.appendTo( $(column.header()).empty() )

The filtering works but as soon as I open the select the sort order of the table changes.

What am I doing wrong?

Answers

  • caisyscaisys Posts: 2Questions: 1Answers: 0

    Turns out, when i open the select it performs a sort on that column. I disabled the sorting and it works fine.

This discussion has been closed.