1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Fix: Plug-in ordering didn't work on initial order

- The resolution of unknown sorting types was being done after the
  sorting structure array of objects was being calculated. As such, a
  string sort was always being done in the first instance!

- This fixes thread 20433
This commit is contained in:
Allan Jardine 2014-04-14 09:28:36 +01:00
parent 261f2c9eb0
commit 3ce42db432
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
528da3b2d730d076d579e6a6168e7cfcde776710 d93e8e306c30875b8c3e94f291dc883befa2fa9f

View File

@ -4305,13 +4305,15 @@
formatters = 0, formatters = 0,
sortCol, sortCol,
displayMaster = oSettings.aiDisplayMaster, displayMaster = oSettings.aiDisplayMaster,
aSort = _fnSortFlatten( oSettings ); aSort;
// Resolve any column types that are unknown due to addition or invalidation // Resolve any column types that are unknown due to addition or invalidation
// @todo Can this be moved into a 'data-ready' handler which is called when // @todo Can this be moved into a 'data-ready' handler which is called when
// data is going to be used in the table? // data is going to be used in the table?
_fnColumnTypes( oSettings ); _fnColumnTypes( oSettings );
aSort = _fnSortFlatten( oSettings )
for ( i=0, ien=aSort.length ; i<ien ; i++ ) { for ( i=0, ien=aSort.length ; i<ien ; i++ ) {
sortCol = aSort[i]; sortCol = aSort[i];