Merge pull request #547 from JMolenkamp/master

ScrollResize: remove draw event handler on table destruction
pull/548/head
Allan Jardine 2 years ago committed by GitHub
commit bb13b174d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -79,15 +79,14 @@ var ScrollResize = function ( dt )
host.css( 'position', 'relative' ); host.css( 'position', 'relative' );
} }
dt.on( 'draw', function () { dt.on( 'draw.scrollResize', function () {
that._size(); that._size();
} ); } );
var onDestroy = function () { dt.on('destroy.scrollResize', function () {
dt.off('.pageResize', onDestroy); dt.off('.scrollResize');
this.s.obj && this.s.obj.remove(); this.s.obj && this.s.obj.remove();
}.bind(this); }.bind(this));
dt.on('destroy.pageResize', onDestroy);
this._attach(); this._attach();
this._size(); this._size();

Loading…
Cancel
Save