Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82245

Sort bug when table has more than 9 columns

$
0
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.


Viewing all articles
Browse latest Browse all 82245

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>