From acfec0847a54cd581a787e20e8740e5976b264e0 Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 22 Jan 2016 13:11:33 +0800 Subject: [PATCH] * fix error in datatable. --- src/js/datatable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/datatable.js b/src/js/datatable.js index e44da46a5..0dc9bc97c 100644 --- a/src/js/datatable.js +++ b/src/js/datatable.js @@ -750,7 +750,7 @@ sortUp = !$th.hasClass('sort-up'); if(data.keepSort) sortUp = !sortUp; - data.keepSort = false; + data.keepSort = null; $headCells.removeClass('sort-up sort-down'); $th.addClass(sortUp ? 'sort-up' : 'sort-down'); @@ -878,7 +878,7 @@ if(!data) $this.data(name, (data = new DataTable(this, options))); if(typeof option == 'string') { - if(option === 'load' && $.isPlainObject(newData) && typeof newData.keepSort !== 'boolean') newData.keepSort = true; + if(option === 'load' && $.isPlainObject(newData) && (newData.keepSort === undefined || newData.keepSort === null)) newData.keepSort = true; data[option](newData); } }); -- GitLab