Not sorting correctly
Not sorting correctly
welfordian
Posts: 1Questions: 1Answers: 0
Table sorting doesn't seem to work as expected.
When creating a table with values one through 10 it seems to pick up 10 as being next in the sorting due to it starting with "1". How can I fix this? It is logical to me that 10 should be last but as it's seeing the "1" first it's also logical that it should be second.
Fiddle: https://jsfiddle.net/hyw0a4bk/1/
This discussion has been closed.
Answers
Hi @welfordian ,
It's the because the street name turns the column into a string, so it's doing string search and not numeric. If you use the Natural ordering plugin, see here, everything works as expected.
Cheers,
Colin