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

onResize is not called, if div has width and height of 0 #111

Open
tho-graf opened this issue Jun 22, 2018 · 0 comments
Open

onResize is not called, if div has width and height of 0 #111

tho-graf opened this issue Jun 22, 2018 · 0 comments

Comments

@tho-graf
Copy link

tho-graf commented Jun 22, 2018

Hi,

I just figured out, that if I have code like this:

<Measure bounds={true} onResize={console.log}>
        {({ measureRef }) => (
          <div ref={measureRef} />
        )}
</Measure>

the onResize gets never called (neither on mount nor on updates).
The same is, if the div has height or width before and then gets empty, I will never get notified/updated, with 0 / 0.

Is this the expected behaviour or is this a bug?

Thanks,
Thomas

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