José Morais
José Morais
The proposed solution creates a new bug: tablesort.index returns null always.
With the proposed solution, this code stop working: tablesort.index is allways null: $('#userList').on('tablesort:complete', function(event, tablesort) { orderByColumn = tablesort.index; direction = tablesort.direction; });
I added my code to your CodePend demo, please check it here: https://codepen.io/anon/pen/VOyWjZ
Ok, it's working. But now, when you click on a column, the default sort is DESC, before was ASC. Thank you for your help.
Your solution is working now. Thank you.