Skip to content

Commit

Permalink
fix(core): we should never show vertical scroll on left frozen contai…
Browse files Browse the repository at this point in the history
…ner (#537)

- we should never show a vertical scroll on the left container when having a frozen grid, even when flag `alwaysShowVerticalScroll` is set to True (in that case, the flag should display a scroll ONLY for the right container)
  • Loading branch information
ghiscoding committed Oct 7, 2020
1 parent 0d9ee69 commit aa42f8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ if (typeof Slick === "undefined") {
function setOverflow() {
$viewportTopL.css({
'overflow-x': ( hasFrozenColumns() ) ? ( hasFrozenRows && !options.alwaysAllowHorizontalScroll ? 'hidden' : 'scroll' ) : ( hasFrozenRows && !options.alwaysAllowHorizontalScroll ? 'hidden' : 'auto' ),
'overflow-y': options.alwaysShowVerticalScroll ? "scroll" : (( hasFrozenColumns() ) ? ( hasFrozenRows ? 'hidden' : 'hidden' ) : ( hasFrozenRows ? 'scroll' : 'auto' ))
'overflow-y': (!hasFrozenColumns() && options.alwaysShowVerticalScroll) ? "scroll" : (( hasFrozenColumns() ) ? ( hasFrozenRows ? 'hidden' : 'hidden' ) : ( hasFrozenRows ? 'scroll' : 'auto' ))
});

$viewportTopR.css({
Expand All @@ -1915,7 +1915,7 @@ if (typeof Slick === "undefined") {

$viewportBottomL.css({
'overflow-x': ( hasFrozenColumns() ) ? ( hasFrozenRows && !options.alwaysAllowHorizontalScroll ? 'scroll' : 'auto' ): ( hasFrozenRows && !options.alwaysAllowHorizontalScroll ? 'auto' : 'auto' ),
'overflow-y': options.alwaysShowVerticalScroll ? "scroll" : (( hasFrozenColumns() ) ? ( hasFrozenRows ? 'hidden' : 'hidden' ): ( hasFrozenRows ? 'scroll' : 'auto' ))
'overflow-y': (!hasFrozenColumns() && options.alwaysShowVerticalScroll) ? "scroll" : (( hasFrozenColumns() ) ? ( hasFrozenRows ? 'hidden' : 'hidden' ): ( hasFrozenRows ? 'scroll' : 'auto' ))
});

$viewportBottomR.css({
Expand Down

0 comments on commit aa42f8b

Please sign in to comment.