From cf19c412cc5400d1e498a1fdcfc1241aaf5c827c Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 26 Aug 2015 16:01:42 +0100 Subject: [PATCH] Fix - features: Length links wasn't operating correctly with an initial default page length of -1 (all rows) - DataTables uses -1 as the infinite page length number, so having a default of -1 in this plug-in causes a conflict. - This fixes #210 - thanks `malte-witt` for the test case and bug report --- features/lengthLinks/dataTables.lengthLinks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/lengthLinks/dataTables.lengthLinks.js b/features/lengthLinks/dataTables.lengthLinks.js index b7abc5e..ff30379 100644 --- a/features/lengthLinks/dataTables.lengthLinks.js +++ b/features/lengthLinks/dataTables.lengthLinks.js @@ -37,7 +37,7 @@ $.fn.dataTable.LengthLinks = function ( inst ) { var api = new $.fn.dataTable.Api( inst ); var settings = api.settings()[0]; var container = $('
').addClass( settings.oClasses.sLength ); - var lastLength = -1; + var lastLength = null; // API so the feature wrapper can return the node to insert this.container = function () {