Browse Source

fix(js): fix #4088, no matches display error

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

+ 2 - 2
src/bootstrap-table.js

@@ -1864,10 +1864,10 @@
         this.$body.html(`<tr class="no-records-found">${Utils.sprintf('<td colspan="%s">%s</td>',
           this.$header.find('th').length,
           this.options.formatNoMatches())}</tr>`)
+      } else {
+        this.$body.html(trFragments)
       }
 
-      this.$body.html(trFragments)
-
       if (!fixedScroll) {
         this.scrollTo(0)
       }