Skip to content

Commit

Permalink
Dev: Correcting checks for appling a minWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Oct 16, 2024
1 parent 3ae6f7f commit 21a716b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions js/core/core.scrolling.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,10 @@ function _fnScrollDraw ( settings )

if (firstTr) {
var colSizes = $(firstTr).children('th, td').map(function (vis) {
var outerWidth = $(this).outerWidth();
var ret = {
return {
idx: _fnVisibleToColumnIndex(settings, vis),
width: outerWidth
width: $(this).outerWidth()
};

if (scrollX) {
ret.minWidth = outerWidth;
}

return ret;
});

// Check against what the colgroup > col is set to and correct if needed
Expand All @@ -262,7 +255,7 @@ function _fnScrollDraw ( settings )
if (colWidth !== colSizes[i].width) {
colEl.style.width = colSizes[i].width + 'px';

if (scrollX) {
if (scroll.sX) {
colEl.style.minWidth = colSizes[i].width + 'px';
}
}
Expand Down

0 comments on commit 21a716b

Please sign in to comment.