Multi Column sort and Custom Type fails to sort second column
Multi Column sort and Custom Type fails to sort second column

I've come across an issue where datatables is failing to sort second column in a order when using a custom type
see: http://live.datatables.net/dirajulu/1/edit
When you press the "button" it shows the icon to indicate both columns are being sorted but the console output is not showing for the second columns sorting.
Repeated pressing it appears to be causing a asc/desc toggle to occur on the 2nd column?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
To clarify, the attached is only a very basic example, my actual requirement is around dates/nulls last, just wanted to confirm it wasn't something else in my code causing the issue, but can confirm from that example it appears to ignore the second order even on a very basic type ordering.
Chopped my example down to the bare minimum:
http://live.datatables.net/qipifuza/1/edit
Could still do with an answer to this, I assume it is a bug, but is it one that'll ever be fixed?
I ran into a similar (or possibly the same) issue. I can't tell definitively but from your statement that your actual requirements are around dates/nulls last I am assuming you are using the Absolute sorting plugin (or a custom version you created). First, the issue with your examples is that you aren't accounting for the equals case. The return statements in your order functions should be as follows:
The same issue is happening in the Absolute sorting plugin. The ordering methods are missing the equals case when checking the alwaysTop and alwaysBottom arrays. The code needs to be updated to the following:
Yep, I'd agree something looks wonky there. It's calling the sort for the first column, but then there's nothing for the second. I'll take a deeper nose and report back.
Hi again all,
Nope, there's not a problem there, tis all good. The issue, as shown in this even more simplified example, is that the comparison functions were missing the 'equals' check:
Cheers,
Colin