mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-27 00:54:15 +01:00
Fix: dt-init sorting
as 1D array didn't get indexing correct
* The sort handler was expecting to deal with a 2D array, so we always dropped into the single column first sort condition. * See thread 20811 for more information.
This commit is contained in:
parent
77343b72cb
commit
d907cc6ceb
@ -1 +1 @@
|
|||||||
d9ae476f33e842c5ed90ffa87e4eb038165c3de9
|
2503461a43a643bd0faf46d2fd78aa482a87c110
|
||||||
|
5
media/js/jquery.dataTables.js
vendored
5
media/js/jquery.dataTables.js
vendored
@ -4529,6 +4529,11 @@
|
|||||||
return idx+1 >= asSorting.length ? 0 : idx+1;
|
return idx+1 >= asSorting.length ? 0 : idx+1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Convert to 2D array if needed
|
||||||
|
if ( typeof sorting[0] === 'number' ) {
|
||||||
|
sorting = [ sorting ];
|
||||||
|
}
|
||||||
|
|
||||||
// If appending the sort then we are multi-column sorting
|
// If appending the sort then we are multi-column sorting
|
||||||
if ( append && settings.oFeatures.bSortMulti ) {
|
if ( append && settings.oFeatures.bSortMulti ) {
|
||||||
// Are we already doing some kind of sort on this column?
|
// Are we already doing some kind of sort on this column?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user