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

recalculate size of Popper when its contents change? #15

Closed
chrisdrackett opened this issue Apr 25, 2017 · 2 comments
Closed

recalculate size of Popper when its contents change? #15

chrisdrackett opened this issue Apr 25, 2017 · 2 comments

Comments

@chrisdrackett
Copy link

I just noticed that if I use the following code:

  <Popper placement="top">
     {this.state.isOpen &&
        <div>test</div>
     }
  </Popper>

There are issues with the placement of the popper content. I'm guessing this is because the popper is being measured when it has no contents. In the simple case this is easy to fix by moving the conditional outside of the popper.

That being said, I did some more digging and found that if the contents of the Popper component change its size/position are not currently recalculated. It would be nice if the Popper component would handle updates to its contents.

@souporserious
Copy link
Collaborator

Just noticed that as well! Beat me to it before I could fix it 😆 working on fixing this for the next release.

@souporserious
Copy link
Collaborator

Fixed 2109ac0 🎉

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