-
Notifications
You must be signed in to change notification settings - Fork 137
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
Provide an explicit prop to disable the animation ? #204
Comments
Yeah, I'm stupid - of course, setting Also, I had to take extra steps so that this "constant Thus, maybe it would be handy to have a separate |
Hey, thanks for bringing up this use case. It seems like it could be fairly common. An alternate solution is to use the I will definitely consider adding a |
Using shouldFlip does seem to work, but has the drawback of needing to apply the prop in each item, and they can be located at an arbitrary depth lower in the React tree. Also, not sure it fully works when adding to that mix inversed Flipped and items having their own nested Flipper-enabled list, I'm still seeing some stray animations at the beginiing of my drag-n-drop operaions even after setting shouldFlip = A single killswitch at the Flipper level sounds easier indeed 👍 |
A |
Hey @jlarmstrongiv, thanks for raising that. I just made a quick release to make sure no animations occur when the user has |
Thank you @aholachek 😄 |
I needed to temporarily disable flip animations based on certain conditions (namely, my flip-enabled list is drag-n-drop reorderable, and the animations are a bit jarring when the user is dragging an item from one place to another).
I struggled a bit to find a way to do that (tried removing the
<Flipped>
wrappers around each item altogether, which was very inefficient of course: full remounting of the whole react tree below the list, noticeable lag on large lists), before finding out that setting flipKey to null (or better, false) does exactly what I wantedTurns out the flipKey prop is indeed documented as "required, string | number | bool", but the effect of setting to false (or true, for that matter ?) is not clearly explained.
Other than that, thanks a ton for the package !
The text was updated successfully, but these errors were encountered: