Browse Source

remove event listener on destroying the table (#6155)

Dustin Utecht 3 years ago
parent
commit
3aba4abf23
1 changed files with 4 additions and 0 deletions
  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) {