From d1ba8bde45e2ee321055f259d7e654c04addeb7b Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 2 Apr 2015 09:14:08 +0100 Subject: [PATCH] Fix API plugin: `order.neutral()` didn't fully restore the order correctly --- api/order.neutral().js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/order.neutral().js b/api/order.neutral().js index 9c95288..0d78eb3 100644 --- a/api/order.neutral().js +++ b/api/order.neutral().js @@ -20,7 +20,11 @@ $.fn.dataTable.Api.register( 'order.neutral()', function () { return this.iterator( 'table', function ( s ) { s.aaSorting.length = 0; - s.aiDisplay.sort(); - s.aiDisplayMaster.sort(); + s.aiDisplay.sort( function (a,b) { + return a-b; + } ); + s.aiDisplayMaster.sort( function (a,b) { + return a-b; + } ); } ); } );