Sort bug when table has more than 9 columns

Sort bug when table has more than 9 columns

rwasef1830rwasef1830 Posts: 2Questions: 0Answers: 0

Hello,
There's a bug in sorting in Datatables 2+, when there's more than 9 columns (eg: 10) and you ask for initial sort of column index 10. Column with index 1 mistakenly is matched.

This is due to this part:
code snippet

As a solution, should prepend , and append at the end , even if it's a single index, and do indexOf with "," + index + "," to ensure partial numbers are not matched.

Will setup a test case and link it soon.

Replies

Sign In or Register to comment.