Browse Source

Fix data option error.

zhixin 11 years ago
parent
commit
54ab4fa1f8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/bootstrap-table.js

+ 5 - 0
src/bootstrap-table.js

@@ -211,6 +211,11 @@
             that.options.columns[i] = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
             that.options.columns[i] = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
         });
         });
 
 
+        // if options.data is setting, do not process tbody data
+        if (this.options.data.length) {
+            return;
+        }
+
         this.$el.find('tbody tr').each(function () {
         this.$el.find('tbody tr').each(function () {
             var row = {};
             var row = {};
             $(this).find('td').each(function (i) {
             $(this).find('td').each(function (i) {