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

Add state for "scrolling to bottom" #12

Open
Greg-Freeman opened this issue Jan 14, 2025 · 0 comments
Open

Add state for "scrolling to bottom" #12

Greg-Freeman opened this issue Jan 14, 2025 · 0 comments

Comments

@Greg-Freeman
Copy link

I am implementing the ability to stop scrolling when a particular div reaches the top of the viewable area. The stopScroll function is perfect for this. However, I'm finding it would be nice to have a variable that indicates that scrollToBottom is currently executing so if my component re-renders while it's scrolling to the bottom, it doesn't see that my div is outside the scrollable area and stop the scroll. Essentially being able to do:

if(!scrollingToBottom){
   //do logic for stopping scroll
}

This would also be beneficial for skipping certain actions if the component renders and the initial scroll is executing.

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

No branches or pull requests

1 participant