From 0af6840c6f0bf87540a9fe1ff43aa47f56a9aef0 Mon Sep 17 00:00:00 2001 From: Catouse Date: Mon, 4 Jan 2016 10:00:48 +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 b930587a..694c478c 100644 --- a/src/js/datatable.js +++ b/src/js/datatable.js @@ -1010,7 +1010,7 @@ return !(result !== undefined && (!result)); }; - $.fn.datatable = function(option) + $.fn.datatable = function(option, newData) { return this.each(function() { @@ -1020,7 +1020,7 @@ if (!data) $this.data(name, (data = new DataTable(this, options))); - if (typeof option == 'string') data[option](); + if (typeof option == 'string') data[option](newData); }); }; -- GitLab