Categories
Why does the animation only work when it appears?
Why only works on enter? https://codesandbox.io/s/qz4j9n5zzq
Answer the question
In order to leave comments, you need to log in
You call done immediately after the show change, so the element is removed immediately without waiting for the animation to finish. You need to use the onComplete callback:
leave(el, done) { TweenMax.to(el, 1, { x: 0, onComplete: done, }); },
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question