-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Transition hooks not working properly (only when using SFCs) #1541
Comments
This caused by the So, I think it should be a break change and it should under user control.We don't implictly call |
Not completely clear on what you're describing. :) If this is supposed to be mitigated by the user, IMO this should be explicitly documented - and it'd be great to know what changes I can make in the meantime. IMO this should not be under use control, since it's both a regression vs. Vue 2, and the different behaviors that can be experienced in Vue 3. At the very least those should be unified or have a warning or something? But that's just my thoughts from a DX perspective. |
Friggin awesome - thanks @yyx990803 !! |
@yyx990803 .This also happened with blew code. onLeave: (...arg) => {
const [el, done] =arg
el.style.backgroundColor = 'red'
setTimeout(done, 10000)
} |
Version
3.0.0-beta.19
Reproduction link
https://github.com/pearofducks/transition-reproduction
Steps to reproduce
Run the example here: https://jsfiddle.net/yubjge1m/4/ (or run the
avoid-sfc
branch of the GitHub repo)done
is called to setdisplay: none
Run the example in the GitHub repro (that uses SFCs)
display: none
immediately, even thoughdone
isn't called until 1s laterWhat is expected?
Element visibility isn't toggled until
done
is calledWhat is actually happening?
Element is hidden immediately
After further investigation, it seems this is caused by something to do with SFCs.
Here is an alternative Codesandbox link that uses SFCs
The text was updated successfully, but these errors were encountered: