-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
Prevent toggling between min and max scroll offsets at end of grid #267
Prevent toggling between min and max scroll offsets at end of grid #267
Conversation
@@ -65,6 +65,8 @@ const FixedSizeGrid = createGridComponent({ | |||
default: | |||
if (scrollLeft >= minOffset && scrollLeft <= maxOffset) { | |||
return scrollLeft; | |||
} else if (minOffset > maxOffset) { | |||
return minOffset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs an explanatory comment, because it looks like a bug at first glance 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point! Now added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you added other places but missed this one 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -65,6 +65,8 @@ const FixedSizeGrid = createGridComponent({ | |||
default: | |||
if (scrollLeft >= minOffset && scrollLeft <= maxOffset) { | |||
return scrollLeft; | |||
} else if (minOffset > maxOffset) { | |||
return minOffset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you added other places but missed this one 😆
Published in 1.8.3 |
Fixes #257
Prevents toggling between the calculated minOffset and maxOffset when minOffset is greater than maxOffset owing to the scrollbar size.