Browse Source

Fix not match colspan bug.

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

+ 2 - 2
src/bootstrap-table.js

@@ -1370,7 +1370,8 @@
         // show no records
         if (!html.length) {
             html.push('<tr class="no-records-found">',
-                sprintf('<td colspan="%s">%s</td>', this.header.fields.length, this.options.formatNoMatches()),
+                sprintf('<td colspan="%s">%s</td>',
+                    this.$header.find('th').length, this.options.formatNoMatches()),
                 '</tr>');
         }
 
@@ -1378,7 +1379,6 @@
         this.$body.html(html.join(''));
         this.trigger('post-rows');
 
-
         if (!fixedScroll) {
             this.scrollTo(0);
         }