filtering only works after sorting
filtering only works after sorting
Hello
I'm hoping someone will be able to provide some guidance.
I'm using column based sorting with the fnFilter() function. I've also added the examples from the DOM based sorting.
http://www.datatables.net/examples/plug-ins/dom_sort.html
The column contains html input elements and I've set up "sSortDataType": "dom-text" in the aoColumnDefs.
Sorting on all columns works great. But I'm only able to filter on a column containing input text elements after I sort it. Filtering on the column prior to sort finds no matches.
Note: columns that contain plain text filter as expected.
I'm hoping someone will be able to provide some guidance.
I'm using column based sorting with the fnFilter() function. I've also added the examples from the DOM based sorting.
http://www.datatables.net/examples/plug-ins/dom_sort.html
The column contains html input elements and I've set up "sSortDataType": "dom-text" in the aoColumnDefs.
Sorting on all columns works great. But I'm only able to filter on a column containing input text elements after I sort it. Filtering on the column prior to sort finds no matches.
Note: columns that contain plain text filter as expected.
This discussion has been closed.
Replies
1. An API plug-in function which will effectively do the same thing as the sort (line 4200) to repopulate from the DOM, and then you can call that whenever is needed.
2. Sort the table again, using fnSort and the current sort settings (fnSettings().aaSorting).
Allan