1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-18 16:54:14 +01:00

Fix: Column ordering state saving was being flatten

* $.map will flatten the return array, which we do not want
This commit is contained in:
Allan Jardine 2014-05-06 15:25:26 +01:00
parent 3dc23c436d
commit 77343b72cb
2 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
0d083ea96f3a3e5fc06d3b1a2104fc7b7c909967
d9ae476f33e842c5ed90ffa87e4eb038165c3de9

View File

@ -4765,10 +4765,13 @@
oSettings._iDisplayStart = oData.iStart;
oSettings.iInitDisplayStart = oData.iStart;
oSettings._iDisplayLength = oData.iLength;
oSettings.aaSorting = $.map( oData.aaSorting, function ( col, i ) {
return col[0] >= columns.length ?
oSettings.aaSorting = [];
$.each( oData.aaSorting, function ( i, col ) {
oSettings.aaSorting.push( col[0] >= columns.length ?
[ 0, col[1] ] :
col;
col
);
} );
/* Search filtering */