Browse Source

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

zhixin 10 years ago
parent
commit
8d2558c4f7
1 changed files with 5 additions and 3 deletions
  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;
         }
     };