You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
As mentioned on Twitter, I'm having some issues using VelocityTransitionGroup with react-popper. When first animating the popper in, the positioning is wrong. To fix it, you need to cause a re-render, either through resizing the window, or similar things that will schedule an update.
I have made a small reproduction repo that illustrates the issue. The body of the render function is as follows;
I've also tried following the tips in #13, by making the child of <Popper /> into a function, and applying the props, but that didn't make any difference in the position.
I'm starting to think that I might need to pass a modifier to make sure it updates on render, but I was under the impression that that should happen automatically through react-popper.
The text was updated successfully, but these errors were encountered:
jkarsrud
changed the title
Usage with VelocityTransitionGroup
Usage with VelocityTransitionGroup gets the wrong position
Jun 13, 2017
Instead of the repo, I changed this to a codesandbox for easier reproduction https://codesandbox.io/s/qvj9qov62w. I was thinking this might be the same kind of issue as #47, or there's something up with wrapping it in a <VelocityTransitionGroup /> (from https://github.com/twitter-fabric/velocity-react) that will make the positioning read out the offsets incorrectly? I'm not 100% sure how best to debug or how to force-schedule an update. Looking at the code, it looks like I won't be able to create my own applyStyle modifier either, as it's being disabled after spreading this.props.modifiers:
I tried adding my own computeStyle modifier, but that only broke things further, so I guess it was a naive and incomplete implementation of it. Hopefully the sandbox will make it easier to reproduce and help me figure out what's wrong here :)
Sorry for the long wait on this. We expose a helper now to schedule an update when necessary. You should call this whenever a popper needs be replaced and might not have picked up the update.
Hi there,
As mentioned on Twitter, I'm having some issues using
VelocityTransitionGroup
withreact-popper
. When first animating the popper in, the positioning is wrong. To fix it, you need to cause a re-render, either through resizing the window, or similar things that will schedule an update.I have made a small reproduction repo that illustrates the issue. The body of the
render
function is as follows;I've also tried following the tips in #13, by making the child of
<Popper />
into a function, and applying the props, but that didn't make any difference in the position.I'm starting to think that I might need to pass a modifier to make sure it updates on render, but I was under the impression that that should happen automatically through
react-popper
.The text was updated successfully, but these errors were encountered: