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

async components in slots don't render on the first pass #9432

Comments

@719media
Copy link

719media commented Feb 6, 2019

Version

2.6.2

Reproduction link

https://codesandbox.io/s/p530yln9z7

Steps to reproduce

Open the repro, follow the instructions.

What is expected?

Component b should appear

What is actually happening?

Component b does not appear


Using Vue 2.5.22 works, or not async loading the component works as well

@719media
Copy link
Author

719media commented Feb 6, 2019

Removing the slot-scope="props" also fixes the problem. Granted, there are no v-bind on the slot definition, so it's a little funny that slot-scope is even used in the repro, but this is a minimal repro so I hoped it would still show the problem to you. I can attempt to come up with a better repro if needed.

Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Previously, an async component uses its lexical owner as the force
update context. This works when the async component is rendered in a
scoped slot because in the past parent components always force update
child components with any type of slots. After the optimization in
f219bed though, child components with only scoped slots are no longer
force-updated, and this cause async components inside scoped slots to
not trigger the proper update. Turns out they should have used the
actual render owner (the component that invokes the scoped slot) as the
force update context all along.

fix vuejs#9432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment