Browse Source

Fixed toggle columns bug

zhixin 5 years ago
parent
commit
84ac3b37fd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/extensions/fixed-columns/bootstrap-table-fixed-columns.js

+ 4 - 0
src/extensions/fixed-columns/bootstrap-table-fixed-columns.js

@@ -191,11 +191,15 @@ $.BootstrapTable = class extends $.BootstrapTable {
     if (this.needFixedColumns && this.options.fixedNumber) {
       this.$fixedHeader = initFixedHeader(this.$fixedColumns)
       this.$fixedHeader.css('margin-right', '')
+    } else {
+      this.$fixedColumns.html('').css('width', '')
     }
 
     if (this.needFixedColumns && this.options.fixedRightNumber) {
       this.$fixedHeaderRight = initFixedHeader(this.$fixedColumnsRight, true)
       this.$fixedHeaderRight.scrollLeft(this.$fixedHeaderRight.find('table').width())
+    } else {
+      this.$fixedColumnsRight.html('').css('width', '')
     }
 
     this.initFixedColumnsBody()