Browse Source

Fix columns bug.

zhixin 11 years ago
parent
commit
d61a189f6c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/bootstrap-table.js

+ 4 - 2
src/bootstrap-table.js

@@ -172,14 +172,16 @@
             this.$header.append('<tr></tr>');
             this.$header.append('<tr></tr>');
         }
         }
         this.$header.find('th').each(function() {
         this.$header.find('th').each(function() {
-            var column = $.extend({},
-                BootstrapTable.COLUMN_DEFAULTS, {
+            var column = $.extend({}, {
                     title: $(this).text()
                     title: $(this).text()
                 }, $(this).data());
                 }, $(this).data());
 
 
             columns.push(column);
             columns.push(column);
         });
         });
         this.options.columns = $.extend(columns, this.options.columns);
         this.options.columns = $.extend(columns, this.options.columns);
+        $.each(this.options.columns, function(i, column) {
+            that.options.columns[i] = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
+        });
 
 
         this.header = {
         this.header = {
             fields: [],
             fields: [],