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

Popover with transformOrigin: bottom does not adjust positioning on rerender #13343

Closed
2 tasks done
vmajsuk opened this issue Oct 22, 2018 · 3 comments
Closed
2 tasks done
Labels

Comments

@vmajsuk
Copy link

vmajsuk commented Oct 22, 2018

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Popover with transformOrigin: bottom & anchorOrigin: top is expected to always render just above the anchor

Current Behavior

On rerender, Popover positioning does not change, which leads to it rendering far above the anchor
I believe this can be fixed by setting anchor position with the help of css bottom property instead of top, when transformOrigin is bottom

Steps to Reproduce

Link:

  1. https://codesandbox.io/s/6jvz9pyzk3

Context

Your Environment

Tech Version
Material-UI v3.2.2
React v16.2.0
@oliviertassinari oliviertassinari added the component: Popover The React component. label Oct 22, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 22, 2018

@vmajsuk It's pretty much the same behavior than with the Popper component: #13179.

@eps1lon
Copy link
Member

eps1lon commented Dec 4, 2018

I think this is pretty much what the action prop in Popover is for:

@oliviertassinari
Copy link
Member

At some point, we will be able to use the ResizeObserver API to automatically handle this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants