Browse Source

Merge pull request #4404 from wenzhixin/fix/toggle-column

Fix initHeader error caused by toggleColumn
Dustin Utecht 6 years ago
parent
commit
c27d413635
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -2233,7 +2233,7 @@ class BootstrapTable {
   }
 
   _toggleColumn (index, checked, needUpdate) {
-    if (index === -1) {
+    if (index === -1 || this.columns[index].visible === checked) {
       return
     }
     this.columns[index].visible = checked