Skip to content

Commit

Permalink
Fix 1477 scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrunyon committed Nov 2, 2023
1 parent 3ff134d commit 3c481ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/grid/src/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1328,11 +1328,12 @@ class Grid extends PureComponent<GridProps, GridState> {

const { isStickyBottom, isStickyRight } = this.props;
const { top, left } = viewState;
const { lastTop, lastLeft } = this.metrics;
if (top != null) {
const { lastTop, lastLeft, hasVerticalBar, hasHorizontalBar } =
this.metrics;
if (top != null && hasVerticalBar) {
this.setState({ isStuckToBottom: isStickyBottom && top >= lastTop });
}
if (left != null) {
if (left != null && hasHorizontalBar) {
this.setState({ isStuckToRight: isStickyRight && left >= lastLeft });
}

Expand Down

0 comments on commit 3c481ce

Please sign in to comment.