Open revolter opened 1 year ago
Hello,
Apologies for the inconvenience. As mentioned in the README, Sortable currently supports numbers, strings, ISO dates.
I am rethinking the support for multiple data types, but in the meantime, if you are willing to contribute a fix, feel free to do so!
As mentioned in the README, Sortable currently supports numbers, strings, ISO dates.
Yes, I got that. But what I don't understand is that even sorting them as simple strings should work. You can verify it using a tool like https://texttools.org/sort-text.
Actually, isn't it because you're enabling numeric
here:
?
Yes, it's due to the collator used for the natural sorting which interprets 02
> 1C
.
Errors like this will continue to pop up, but I don't want to bodge things anymore, rather rethink the method from the ground up. I like the Wikipedia approach of specifying a data-sort-type
attribute or just letting the user write a custom comparator function for the column they want to sort (#12).
In the meantime, feel free to patch the source to suit your needs.
For these entries:
this extension sorts them as:
instead of:
Diff
```diff 00-55-DA-52-FA-15 -1C-69-7A-6B-15-9D 02-E5-27-38-DB-CF +1C-69-7A-6B-15-9D ```