Problem with drawCallback and sorting
Problem with drawCallback and sorting

Hi Allan,
I'm simply trying to invoke a function (that updates filter dropdowns) after the table is drawn but NOT after it's sorted..
I'm using the drawCallback, but it's also called after sorting a column (which cleans out my filters unfortunately),
I googled for a solution to this, the first thing that pops up is your reply on the forum to a similar issue back in 2010 > https://datatables.net/forums/discussion/2976/sort-callback.
You mention the 'bSorted' Boolean that could be checked, I tried it and it's always false, I'm assuming it's an old
legacy property and maybe no longer in use..
I also tried listening for the 'order' event and using my own flag, but that event also runs every time there's a draw so no good.. please help me figure this one out, thanks! ;]
Answers
draw() will by default result in a full re-order and re-search of the table. However, you can use page parameter to avoid reordering: table.draw('page');
https://datatables.net/reference/api/draw()