ソースを参照

Micro-optimization for switchableLabel

Aleksey Kuznietsov 1 年間 前
コミット
9725fcb84c
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

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