Vue-next: Slot with dynamic name attribute does not update contents

Created on 1 Nov 2020  路  1Comment  路  Source: vuejs/vue-next

Version

3.0.2

Reproduction link

https://codesandbox.io/s/elegant-silence-k52xk

Steps to reproduce

Go to https://codesandbox.io/s/elegant-silence-k52xk and click the tabs.

What is expected?

The contents of Tabs.vue's slot should change.

What is actually happening?

The contents of the first tab displays, but never changes.


I have the same code in a vue 2 sandbox and it works as expected. See https://codesandbox.io/s/hungry-hill-lf8xo.
I have looked but cannot find any documented reason why this wouldn't work the same in Vue 3.

bug compiler

Most helpful comment

You need to add a key to the slot:

<slot :name="activeTab" :key="activeTab"></slot>

>All comments

You need to add a key to the slot:

<slot :name="activeTab" :key="activeTab"></slot>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mika76 picture mika76  路  3Comments

mannok picture mannok  路  3Comments

cexbrayat picture cexbrayat  路  4Comments

anandkumarram picture anandkumarram  路  4Comments

chrisvfritz picture chrisvfritz  路  4Comments