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

Overlays with open={true} by default don't render #379

Open
etr2460 opened this issue Jun 1, 2020 · 1 comment
Open

Overlays with open={true} by default don't render #379

etr2460 opened this issue Jun 1, 2020 · 1 comment

Comments

@etr2460
Copy link

etr2460 commented Jun 1, 2020

I believe the change made in #287 resulted in Overlays not rendering if the open param is set to true initially. This seems to be because the Overlay doesn't render its children until it updates once, and if we initialize open to true then it never updates.

You should be able to repro this with a simple case like:

<Overlay open={true} onClose={() => undefined}>
  <div>This doesn't display</div>
</Overlay>
@williaster
Copy link
Contributor

@alecklandgraf should this line in your PR be

if (x !== this.state.x || y !== this.state.y || !this.state.targetRectReady)

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

2 participants