Custom sorting


Custom sorting is not working for the descending order.

First time when you click on the header it will sort it in the asc order.

Then any more clicks on the same header doesn’t change the rows order.

Please check code of your sorting method, it has 3 parameters, first and seconf used for comparable values, third one provides current sorting order.

function custom_sort(a,b,ord){
return (a>b?1:-1)*(ord==“asc”?1:-1);