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 onLaneScroll not working on different screen sizes #422 #431

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

oliviervanbulck
Copy link
Contributor

@oliviervanbulck oliviervanbulck requested a review from dapi as a code owner February 5, 2021 09:28
@@ -26,7 +26,7 @@ class Lane extends Component {
const node = evt.target
const elemScrollPosition = node.scrollHeight - node.scrollTop - node.clientHeight
const {onLaneScroll} = this.props
if (elemScrollPosition <= 0 && onLaneScroll && !this.state.loading) {
if (elemScrollPosition <= 1 && onLaneScroll && !this.state.loading) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would < 1 also work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that'd work too. Normally the difference is never going to be 1 or more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys! It's very cool that you fixes that issue!

I believe it's better to describe this line and put a link to the issue. Because if you do not know the reason, then this code looks strange.

Also I prefer < 1 )

@@ -26,7 +26,7 @@ class Lane extends Component {
const node = evt.target
const elemScrollPosition = node.scrollHeight - node.scrollTop - node.clientHeight
const {onLaneScroll} = this.props
if (elemScrollPosition <= 0 && onLaneScroll && !this.state.loading) {
if (elemScrollPosition <= 1 && onLaneScroll && !this.state.loading) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys! It's very cool that you fixes that issue!

I believe it's better to describe this line and put a link to the issue. Because if you do not know the reason, then this code looks strange.

Also I prefer < 1 )

@oliviervanbulck oliviervanbulck requested a review from dapi February 9, 2021 13:33
Copy link
Collaborator

@dapi dapi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliviervanbulck thank!

Will merge if @corvec agree )

@dapi dapi merged commit 7c7b7c8 into rcdexta:master Feb 10, 2021
@rcdexta
Copy link
Owner

rcdexta commented Jun 24, 2021

🎉 This PR is included in version 2.2.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants