Using the 'numeric' and 'sensitivity' options in localCompare to provide a Natural Sort strategy.
This will keep the original intended sorting in place but provide an alternative for those that wish to use natural sorting for alphanumeric characters.
Example:
Normal string sort
Item 1
Item 10
Item 2
Natural sort:
Item 1
Item 2
Item 10
Usage is the same as any other sort strategy in jsGrid:
Using the 'numeric' and 'sensitivity' options in localCompare to provide a Natural Sort strategy.
This will keep the original intended sorting in place but provide an alternative for those that wish to use natural sorting for alphanumeric characters.
Example:
Normal string sort
Natural sort:
Usage is the same as any other sort strategy in jsGrid:
{ fields: [ ... { name: "Name", sorter: "stringNaturalSort" }, ... ] }