Skip to content

Commit

Permalink
b075a834caf1d67b59d99a9e9c022c49079e9019 Dev: Correction to last commit
Browse files Browse the repository at this point in the history
Sync to source repo @b075a834caf1d67b59d99a9e9c022c49079e9019
  • Loading branch information
dtbuild committed Oct 7, 2024
1 parent d32151e commit f144917
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.1.8",
"last-sync": "46bf228318d87acfc0d3d96d843129ebaac0cb86"
"last-sync": "b075a834caf1d67b59d99a9e9c022c49079e9019"
}
19 changes: 10 additions & 9 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -13295,15 +13295,16 @@

// Responsive - check if the buttons are over two lines based on the
// height of the buttons and the container.
var outerWidth = $(buttonEls[0]).outerHeight();

if (
buttonEls.length && // any buttons
opts.buttons > 1 && // prevent infinite
outerWidth > 0 && // will be 0 if hidden
$(host).height() >= (outerWidth * 2) - 10
) {
_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));
if (buttonEls.length) {
var outerWidth = $(buttonEls[0]).outerHeight();

if (
opts.buttons > 1 && // prevent infinite
outerWidth > 0 && // will be 0 if hidden
$(host).height() >= (outerWidth * 2) - 10
) {
_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13242,15 +13242,16 @@ function _pagingDraw(settings, host, opts) {

// Responsive - check if the buttons are over two lines based on the
// height of the buttons and the container.
var outerWidth = $(buttonEls[0]).outerHeight();

if (
buttonEls.length && // any buttons
opts.buttons > 1 && // prevent infinite
outerWidth > 0 && // will be 0 if hidden
$(host).height() >= (outerWidth * 2) - 10
) {
_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));
if (buttonEls.length) {
var outerWidth = $(buttonEls[0]).outerHeight();

if (
opts.buttons > 1 && // prevent infinite
outerWidth > 0 && // will be 0 if hidden
$(host).height() >= (outerWidth * 2) - 10
) {
_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));
}
}
}

Expand Down

0 comments on commit f144917

Please sign in to comment.