Sort values descending, nulls last
Hi there!
At the moment the default of this script is sort the values in ascending order with nulls last. But when I try to sort the values in descending order, the nulls values appear on the top. Is there a way to move the null values to the bottom (and also keeping nulls last when sorting in ascending order)?
It should be around lines 492-518 in jstable.js, but it's hard to understand what's happening there exactly.
Thanks!
Hey @hv92,
your feature request is currently not implemented. As you already found out the sorting is done in the mentionen rows. Therefore the JavaScript sorting (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description) with a custom sorting algorithm is used. The custom sorting algorithm removes some possible prefixes/suffixes to enable sorting of additional values. Additionally empty values are sorted to the top. Feel free to submit a pull request with an option to inverse this behaviour.