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
[Feature Request] clean up bootable content on close #6764
Comments
All of the applications that I have been building are very data driven and produce A LOT of DOM nodes. One of the ways that I can reduce the DOM node overhead (aside from using a some special observer events to deterministically unload nodes) is to put UI into dialog boxes. In order to keep my UI lean on DOM Node usage, I need to be able to clean up the contents of a dialog after it closes. This feature can be very valuable to keep the browser performant. Also: Use case for this feature The dialog contents gets the user list data upon creation. We could perform a |
Currently for almost every single dialog I have to have two state variables. One to track if the dialog is visible I end up doing this almost every single time. It's getting very tedious. |
Would like to see this added to V3 |
I too have found over 90% of my usage case of dialog I need it to destroy inner content. Made my own dialog in Vue 3 that does this without ruining the close animation, so easy to achieve vs Vue 2. |
Problem to solve
See: #4518, this might make more sense now that
lazy
is the new default in2.0
.I know a workaround is to use a
v-if
on the content, but this can cause issues with transitionsProposed solution
Make sure content inside a
v-dialog
etc. rerenders by default, a prop likekeep-alive
could be introduced to get the current behaviourThe text was updated successfully, but these errors were encountered: