Browse Source

Merge pull request #4148 from TantumLabs/patch-1

Fixed `theadClasses` is not set when a `thead` exists.
文翼 6 years ago
parent
commit
2f420f207c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/bootstrap-table.js

+ 2 - 0
src/bootstrap-table.js

@@ -666,6 +666,8 @@
       this.$header = this.$el.find('>thead')
       if (!this.$header.length) {
         this.$header = $(`<thead class="${this.options.theadClasses}"></thead>`).appendTo(this.$el)
+      } else if (this.options.theadClasses) {
+        this.$header.addClass(this.options.theadClasses)
       }
       this.$header.find('tr').each((i, el) => {
         const column = []