Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust the left/right canvas width properly when fullWidthRows is used #664

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,18 @@ if (typeof Slick === "undefined") {
}
}
var totalRowWidth = canvasWidthL + canvasWidthR;
return options.fullWidthRows ? Math.max(totalRowWidth, availableWidth) : totalRowWidth;
if (options.fullWidthRows) {
var extraWidth = Math.max(totalRowWidth, availableWidth) - totalRowWidth;
if (extraWidth > 0) {
totalRowWidth += extraWidth;
if (hasFrozenColumns()) {
canvasWidthR += extraWidth;
} else {
canvasWidthL += extraWidth;
}
}
}
return totalRowWidth;
}

function updateCanvasWidth(forceColumnWidthsUpdate) {
Expand Down Expand Up @@ -6166,4 +6177,4 @@ if (typeof Slick === "undefined") {
Grid: SlickGrid
}
});
}(jQuery));
}(jQuery));