tablesort icon indicating copy to clipboard operation
tablesort copied to clipboard

Sorting is applied to a wrong column when using colspan

Open xPaw opened this issue 11 years ago • 4 comments
trafficstars

See http://jsfiddle.net/jLLsr54n/2/ converted price is not sorted correctly)

xPaw avatar Sep 21 '14 09:09 xPaw

Any update with this issue? I also have the same problem when having groups (using colspan) in my table it's incorrectly sorting the table, some records go to the other group depending to there alphabetical order or from lower to higher number. Demo: http://jsfiddle.net/ewdesk2w/

robertpeter07 avatar Oct 24 '14 00:10 robertpeter07

Same problem here

iamstarkov avatar May 24 '15 06:05 iamstarkov

rowspan also makes things bork

ComLock avatar Apr 04 '16 15:04 ComLock

I have the exact same problem as @robertpeter07.

Could this be fixed by checking if the cell exists before calling getInnerText(), on this line?

E.g.:

var cell = that.table.tBodies[0].rows[i].cells[column];
item =  cell && getInnerText(cell) || '';

knokit avatar May 27 '16 09:05 knokit