Merge pull request #549 from JMolenkamp/fix-page-resize

PageResize: delay initial call to _size until table is fully initialized
pull/553/head
Allan Jardine 2 years ago committed by GitHub
commit 131b63b623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -98,7 +98,15 @@ var PageResize = function ( dt, pageResizeManualDelta )
dt.on('destroy.pageResize', onDestroy);
this._attach();
this._size();
// Delay the initial sizing until the table is fully initialized
// such that the pagination element is also added and can be taken
// into account.
var initEvent = 'init.pageResize';
dt.on(initEvent, function () {
dt.off(initEvent);
this._size();
}.bind(this));
};

Loading…
Cancel
Save