Browse Source

Added load hanlder

Dennis Hernández 10 years ago
parent
commit
bedda9d101
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/extensions/flatJSON/bootstrap-table-flatJSON.js

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

@@ -73,10 +73,14 @@
     BootstrapTable.prototype.load = function (data) {
         //If the flat is true
         if (this.options.flat) {
-            this.options.data = sd.flatHelper(this.options.data);
+            this.options.data = sd.flatHelper(data);
+        }
+
+        if (this.options.sidePagination === 'server') {
+            this.data = this.options.data;
         }
-        
-        _load.apply(this, Array.prototype.slice.apply(arguments));
+
+            _load.apply(this, Array.prototype.slice.apply(arguments));
     };
 
     //Main functions