ソースを参照

remove event listener on destroying the table (#6155)

Dustin Utecht 3 年 前
コミット
3aba4abf23
1 ファイル変更4 行追加0 行削除
  1. 4 0
      src/bootstrap-table.js

+ 4 - 0
src/bootstrap-table.js

@@ -3011,6 +3011,10 @@ class BootstrapTable {
     this.$el.html(this.$el_.html())
       .css('margin-top', '0')
       .attr('class', this.$el_.attr('class') || '') // reset the class
+
+    const resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id'))
+
+    $(window).off(resizeEvent)
   }
 
   resetView (params) {