浏览代码

Fixed no records found colspan error

zhixin 5 年之前
父节点
当前提交
b7b42c894a
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) {