-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
When using Array.splice to modify the KeepAlive's prop "include", the component's onUnmounted hook does not trigger #11717
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
scope: keep-alive
Comments
Talk is cheap, show me the code. |
edison1105
added
need more info
Further information is requested
can't reproduce
labels
Aug 26, 2024
The code is here @edison1105 |
a workaround :include="[...cacheList]" |
Yes, it worked for me. And will this issue be fixed in the future? |
@l123wx Yes, Let's keep this one open. |
edison1105
added
scope: keep-alive
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
and removed
need more info
Further information is requested
can't reproduce
labels
Aug 26, 2024
Okay, thanks. |
edison1105
added
the
has workaround
A workaround has been found to avoid the problem
label
Aug 27, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
scope: keep-alive
Vue version
3.4.38
Link to minimal reproduction
playground
Steps to reproduce
What is expected?
Since Home has been removed from include, the onUnmounted hook of the Home component should be triggered
What is actually happening?
The onDeactivated hook of Home was triggered
System Info
Any additional comments?
When the include variable is rendered on the page, everything will become normal again. This can be tested with the following steps:
This time, you can see that the onMounted hook of Home is triggered correctly.
The text was updated successfully, but these errors were encountered: