Bug with ordering by name
Bug with ordering by name

When using order()
to order by name in ascending direction (e.g. table.order([{ name: "position", dir: "asc" }]);
), after that the first click on the header of the ordered column does nothing.
When ordering this way in descending order instead, the first click on the header of the ordered column makes it order in ascending order instead being unordered as would be expected.
Note that when ordering by name on initialization, this bug doesn't occur.
Here's a test case that demonstrates the bug: https://live.datatables.net/buxakafe/1/
The test cases uses serverSide
, but the bug also occurs without it.
Replies
Interesting one. Thank you for the test case and posting this. It is almost certainly something to do with the index that DataTables uses to keep track of the order sequence. I'll look into it and post back.
Allan
Thanks!
Fix and tests committed here. It will be in the nightly shortly, and in the next release
.
Allan
That was fast! Thank you very much!
Wish I was that fast for all of them...!