Skip to content

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

Closed
@EvgenyOrekhov

Description

@EvgenyOrekhov

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 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions