浏览代码

Fix #434: flatJSON bug when the side of pagination is server.

zhixin 10 年之前
父节点
当前提交
8d2558c4f7
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/extensions/flatJSON/bootstrap-table-flatJSON.js

+ 5 - 3
src/extensions/flatJSON/bootstrap-table-flatJSON.js

@@ -45,11 +45,13 @@
     BootstrapTable.prototype.initData = function () {
 
         _initData.apply(this, Array.prototype.slice.apply(arguments));
-        var that = this;
 
         //If the flat is true
-        if (that.options.flat) {
-            that.options.data = sd.flatHelper(that.options.data);
+        if (this.options.flat) {
+            this.options.data = sd.flatHelper(this.options.data);
+        }
+        if (this.options.sidePagination === 'server') {
+            this.data = this.options.data;
         }
     };