Browse Source

Merge pull request #7289 from utilmind/develop

Micro-optimization for switchableLabel
文翼 1 year ago
parent
commit
6603b40ece
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -729,7 +729,7 @@ class BootstrapTable {
             if (column.switchable) {
               html.push(Utils.sprintf(this.constants.html.toolbarDropdownItem,
                 Utils.sprintf('<input type="checkbox" data-field="%s" value="%s"%s%s> <span>%s</span>',
-                  column.field, i, checked, disabled, column.switchableLabel ? column.switchableLabel : column.title)))
+                  column.field, i, checked, disabled, column.switchableLabel || column.title)))
               switchableCount++
             }
           })