Closed oggolder closed 8 years ago
I can confirm this, but honestly, there doesn't seem any reasonable way in which this could've been fixed; sorting doesn't make sense if there are spans, because, frankly, how should it cope with them? Sorting works by reordering the elements, and if we decide that the elements of a span (cells) a) are monolithic, and thus can't be reordered - then the sorting fails, b) ain't monolithic, and can be reordered - then the span is broken.
As such, it's a WONTFIX/CANTFIX for me, unless you (or anyone else) propose a sensible algo to solve this particular case.
tl;dr in current implementation, sorting tables with spans is https://en.wikipedia.org/wiki/Undefined_behavior , and IMO it should stay that way. Either don't put spans in sortable tables, or don't sort them if they have to have spans.
BTW, your example allowed me to find a bug in the current implementation of date sorting - so it was not all for naught, mate.
If you use a table like the following...
an extra column appears, and the order in the 3rd column is wrong.