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

Feature request: allow specifying a custom scrollable element to track #263

Closed
EvgenyOrekhov opened this issue Mar 27, 2024 · 1 comment · Fixed by #311 or #312
Closed

Feature request: allow specifying a custom scrollable element to track #263

EvgenyOrekhov opened this issue Mar 27, 2024 · 1 comment · Fixed by #311 or #312
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@EvgenyOrekhov
Copy link

Problem Description

Right now react-scroll-direction can track only window scroll.
It would be great if it could track scroll for any custom scrollable element.

Suggested Solution

Maybe make it accept a ref?

const ref = useRef();
const { scrollDir } = useDetectScroll({ ref });
@SMAKSS
Copy link
Owner

SMAKSS commented Mar 31, 2024

Hi @EvgenyOrekhov, thanks for your feature suggestion! I’ll aim to include it in the upcoming major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
2 participants