Alphabetical Sorting Works with the Exception of the letter D
Alphabetical Sorting Works with the Exception of the letter D
spydergoateater
Posts: 2Questions: 1Answers: 0
So I was testing the sorting function for my 2-column table and I noticed that everything sorts properly, but the name that starts with D comes after the letter H for some reason. I've tried duplicating several times but it always comes after H and not C.
This discussion has been closed.
Answers
The problem is specific to your data. Can you provide an example showing this? Please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
https://jsfiddle.net/gnky7erp/
Looking specifically at the "Dominion" one the issue is the data as Kevin suggests. If you look at most of the data it starts:
The Dominion row starts:
It is really subtle, but there is a {space} before the
Credit
. There isn't for theDominion
. That is what is messing with your sorting.How are you generating that HTML? Are you able to remove the white space (including new lines) in the opening
a
of each cell in that column?Allan