Browse Source

Fix resizable not work via JavaScript (#4809)

文翼 5 years ago
parent
commit
4e3c89bf94
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/bootstrap-table.js

+ 5 - 5
src/bootstrap-table.js

@@ -127,11 +127,6 @@ class BootstrapTable {
       }
 
       this.$tableFooter = this.$container.find('.fixed-table-footer')
-    } else {
-      if (!this.$tableFooter.length) {
-        this.$el.append('<tfoot><tr></tr></tfoot>')
-        this.$tableFooter = this.$el.find('tfoot')
-      }
     }
   }
 
@@ -1893,6 +1888,11 @@ class BootstrapTable {
       html.push('</th>')
     }
 
+    if (!this.options.height && !this.$tableFooter.length) {
+      this.$el.append('<tfoot><tr></tr></tfoot>')
+      this.$tableFooter = this.$el.find('tfoot')
+    }
+
     this.$tableFooter.find('tr').html(html.join(''))
 
     this.trigger('post-footer', this.$tableFooter)