-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
skipAnimation
not working as expected with delay
prop
#1783
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pmndrs/react-spring-io/33kjD7NJNW4GUZ8nMX4gr1qY6u9G |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e16462e:
|
G.skipAnimation
not working as expected with delay
prop
G.skipAnimation
not working as expected with delay
propskipAnimation
not working as expected with delay
prop
Sorry, is this a test that already exists or one you made that thus failed because of the bug? If latter, it would be great to include this text so we're more confident in the future! |
Here is CSB with both tests. The first one is example from react-spring docs. |
Sorry, I more meant about including a test or two in our suite, which I have now done. |
Awesome, thank you! 🔥 |
Why
As seen in this doc,
skipAnimation
prop should:skip animations and jump straight to the 'to' value
.Which is what it does. But it applies the delay first (when defined ofc).
Test below is based on the one from the linked docs. Only added
delay
to the animation. I want to test theto
value as in the original test.Test fails because the delay is applied.
If I expect
skipAnimation
to finish all animations immediately, I would also expectdelay
not being applied.Related discussion & repro code:
#1779
More docs:
https://aleclarson.github.io/react-spring/v9/#The-skipAnimation-global
What
Added
skipAnimation
check toscheduleProps
.