Skip to content

Commit

Permalink
fix: setOptions should call setOverflow when changing frozenColum…
Browse files Browse the repository at this point in the history
…ns (#608)

- if we change from a regular grid to a frozen grid dynamically by calling `setOptions({ frozenColumn: 2 })` then it should call `setOverflow` to redo the associated css overflow. This PR does just that and prior to this PR the overflow was just reset and sometime the scrolling was showing up on the left section when it shouldn't
  • Loading branch information
ghiscoding authored May 18, 2021
1 parent f229917 commit 4af8c72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ if (typeof Slick === "undefined") {
return options;
}

function setOptions(args, suppressRender, suppressColumnSet) {
function setOptions(args, suppressRender, suppressColumnSet, suppressSetOverflow) {
if (!getEditorLock().commitCurrentEdit()) {
return;
}
Expand Down Expand Up @@ -2938,6 +2938,9 @@ if (typeof Slick === "undefined") {

setFrozenOptions();
setScroller();
if (!suppressSetOverflow) {
setOverflow();
}
zombieRowNodeFromLastMouseWheelEvent = null;

if (!suppressColumnSet) {
Expand Down

0 comments on commit 4af8c72

Please sign in to comment.