ソースを参照

Merge branch 'develop' into feature/multiselect-filtercontrol

Dennis Hernández 4 年 前
コミット
e2cc6967d3

+ 11 - 0
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -172,6 +172,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
     super.init()
   }
 
+
   initBody () {
     super.initBody()
     if (this.options.filterControl) {
@@ -182,6 +183,16 @@ $.BootstrapTable = class extends $.BootstrapTable {
     }
   }
 
+  load (data) {
+    super.load(data)
+
+    if (!this.options.filterControl) {
+      return
+    }
+
+    UtilsFilterControl.createControls(this, UtilsFilterControl.getControlContainer(this))
+  }
+
   initHeader () {
     super.initHeader()
     if (!this.options.filterControl) {

+ 2 - 0
src/extensions/filter-control/utils.js

@@ -394,6 +394,8 @@ export function createControls (that, header) {
     $.each(header.find('th'), (_, th) => {
       const $th = $(th)
 
+      $th.find('.filter-control').remove()
+
       if ($th.data('field') === column.field) {
         $th.find('.fht-cell').append(html.join(''))
         return false