Skip to content
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

[Bug Report][3.6.8] v-dialog 'leave' transition does not work when v-if is falsy. #19963

Closed
austin-agronick opened this issue Jun 7, 2024 · 1 comment
Labels
upstream Problem with a third party library that we may have to work around wontfix The issue is expected and will not be fixed

Comments

@austin-agronick
Copy link

Environment

Vuetify Version: 3.6.8
Vue Version: 3.4.27
Browsers: Chrome 125.0.0.0
OS: Linux x86_64

Steps to reproduce

I have an issue with the v-dialog 'leave' transition (default is to scale down).

The v-dialog in question has a :value attribute always set to true (active).
There is also a v-if on the dialog (this could also be a container div of the dialog that has the v-if, same issue).
When the v-if condition is met the dialog transitions (scales up) into view as expected.
When the v-if condition is not longer met, the dialog disappears without the leave transition (no scale down, just disappears straight away);
The 'leave' transition however works as expected when toggling just the :value attribute of the dialog.

Expected Behavior

The dialog's 'leave' transition scales down out of view when the v-if on it is set to a falsy value.

Actual Behavior

The dialog's 'leave' transition is not shown when the v-if on it is set to a falsy value, it instead disappears straight away.

Reproduction Link

https://codepen.io/digitalsounds/pen/bGwpGrm

Other comments

this is a duplicate of #12742 which was previously closed and labeled 'wontfix' but this seems to be in error due to a misunderstanding of the reported issue. I discussed the reason v-if usage is needed in the discord server here.
It is a performance improvement for dialog components with a lot of script setup code to be toggled via v-if so that the script setup code does not run until the dialog is opened.

@KaelWD
Copy link
Member

KaelWD commented Jun 11, 2024

Vue does not provide a way for us to do this, the elements are removed immediately when v-if becomes false.

https://v3-migration.vuejs.org/breaking-changes/transition-as-root.html

@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
@KaelWD KaelWD added wontfix The issue is expected and will not be fixed upstream Problem with a third party library that we may have to work around labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Problem with a third party library that we may have to work around wontfix The issue is expected and will not be fixed
Projects
None yet
Development

No branches or pull requests

2 participants