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

Fixed Auto Scroll Issue #97

Closed
wants to merge 1 commit into from

Conversation

sgadman
Copy link

@sgadman sgadman commented Jun 16, 2022

This is a solution to fix the auto scroll issue described in Issue #59

@jacobworrel
Copy link
Owner

Thanks for submitting a PR @sgadman ! I'll review your changes when I have some time.

@sgadman
Copy link
Author

sgadman commented Jul 12, 2022

@jacobworrel Have you had a chance to look at this PR?

@dkertson-balto
Copy link

Bump. Would love to have these changes merged

@jacobworrel
Copy link
Owner

I have been swamped with work and havent been able to review these changes but am hoping to get around to it sometime. 😔

}
},
[currentIndex, children, list]
[currentIndex, children, list, ref]

Choose a reason for hiding this comment

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

ref is unnecessary in the dependency.

const menuRect = refCurrent.getBoundingClientRect();

if (Math.abs(currentItemRect.top - menuRect.bottom) <= Math.abs(currentItemRect.top - menuRect.top)) {
if (currentItemRect.top + 5 >= menuRect.bottom) {

Choose a reason for hiding this comment

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

why 5?

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

Successfully merging this pull request may close these issues.

4 participants