Slot not updating from nested v-for
Version
3.0.7
Reproduction link
https://codesandbox.io/s/vue-3-slot-bug-6hj9c
Steps to reproduce
Click the buttons and compare the expected with actual behaviour.
What is expected?
The slot should update the visible content to the results in the computed.
What is actually happening?
The slot isn't updating.
It took me a long time to figure out what might be causing this bug. It seems to be the combination of a few different things:
- The hierarchical data in the computed isn't deeply reactive
- The v-for is used on the "First" component and the default slot has elements that need updating
- The "First" component uses the "Second" component to encapsulate the slot
- There's a slot that is v-if'ed in the "First" component