-
-
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
Unhandled error during execution of scheduler flush when rendering components in a transition group that have a v-if directive #5168
Comments
The interesting thing is that this error only seems to occur if you have both the If you take either of them out, everything works as expected. |
Further testing reveals that using |
@LinusBorg I don't think this is a bug: |
I don't think While TransitionGroup skips comment nodes from direct children (i.e. the div with the Now, we can talk about wether a component in a transition group must always have a root element, but I feel like there may be an actual fix. |
Right, but that bar component shouldn’t go in the transition group, it should go in a transition and then it works |
Actually it won't, because if I create a nested transition for the bar
element or others, then it will break the move transition effect that I
have and am using for the group.
Instead, the bar item will transition itself fine, but the rest of the
items in the group will just be moved into their new place in an abrupt way
without animation.
This is the reason why both the v-for elements and the components with v-if
are in the same group. So that once they have loaded their items, all other
items in the group make space for the new item elegantly and slide aside.
This is maybe not reflected properly in the fiddle, as I was aiming to
reproduce the bug there, not to demonstrate the full use case.
If it's possible to use v-if on the component directly in a transition
group, you'd expect it to be allowed to use a v-if on the root element of
the component itself too though. It seems to make sense (as long as there
is just one root element).
Thanks for looking into this
…On Mon, Dec 27, 2021, 01:17 Eduardo San Martin Morote < ***@***.***> wrote:
Right, but that bar component shouldn’t go in the transition group, it
should go in a transition and then it works
—
Reply to this email directly, view it on GitHub
<#5168 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXYQVVNTIS3EXTA3EVNQ3US4BTXANCNFSM5KXERRCA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I am having the same issue when working with Q-Table (Quasar). Because of this the table updates only first time and subsequent changes wont reflect throwing this issue |
…d text nodes (vuejs#9421) close vuejs#4621 close vuejs#4622 close vuejs#5153 close vuejs#5168 close vuejs#7898 close vuejs#9067
Version
3.2.26
Reproduction link
sfc.vuejs.org/
Steps to reproduce
I am using a transition group as follows:
Within it, I have a list of custom components. If I apply a
v-if
on these components within the parent template, everything works as expected:Both
foos
andbars
are loaded asynchronously, and the components appear correctly with a transition animation as soon as the items are loaded and available.However, I tried to refactor this to letting the components load the items themselves, and if I move the
v-if
into the child component (still on the outer most HTML element), as follows:This however triggers a series of errors in the console:
What is expected?
That if using a
v-if
inside of a child component which is listed in atransition-group
, this works as expected.What is actually happening?
The error as above is thrown and
v-for
some of the components in the transition group fail to render.Trying to render components in a transition group and govern their appearance internally in the component instead of externally in the parent component.
To reproduce in the playground, remove the
v-if
condition on the Bar.vue component to make the example work, then put it back to trigger the error.The text was updated successfully, but these errors were encountered: