Skip to content

Allow passing a root prop to IntersectionObserver #169

@santialbo

Description

@santialbo

If using this on elements inside a scrollable div, you need to pass the root prop in order for the offset to work correctly. Otherwise offset is "ignored" and elements are only "visible" when they are actually visibile.

We just need a new root prop of type Element that can be passed optionally to the IntersectionObserver constructor

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions