Skip to content

Doesn't measure position updates when size doesn't change #37

@nicholaschiang

Description

@nicholaschiang

I'm not sure if the issue title above is 100% correct, but I think it's the best way to describe my issue.

See this code sandbox and notice that the rightX variable doesn't update properly when the div's min-width is met (and the bottom scroller appears):

use-measure-wrong

It only updates to the correct position after the div is scrolled. On the other hand, the wrapper div position is correct until the div is scrolled.

useMeasure should report the correct position of the child div (the one with the scrollbar) when the parent moves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions