Browse Source

Fixed no records found colspan error

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

+ 1 - 1
src/bootstrap-table.js

@@ -1470,7 +1470,7 @@ class BootstrapTable {
     // show no records
     if (!hasTr) {
       this.$body.html(`<tr class="no-records-found">${Utils.sprintf('<td colspan="%s">%s</td>',
-        this.$header.find('th').length,
+        this.getVisibleFields().length,
         this.options.formatNoMatches())}</tr>`)
     } else {
       if (!this.options.virtualScroll) {