Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Wrong :key used for Message demo? #40

Open
space88man opened this issue Feb 19, 2022 · 0 comments
Open

Wrong :key used for Message demo? #40

space88man opened this issue Feb 19, 2022 · 0 comments

Comments

@space88man
Copy link

space88man commented Feb 19, 2022

In MessagesDemo.vue, demo'ing the Message component

<transition-group name="p-message" tag="div">
    <Message v-for="msg of message" :severity="msg.severity" :key="msg.content">{{msg.content}}</Message>
</transition-group>

the :key should be msg.id. If you don't change the content, e.g. click 'Success', dismiss the Message, click 'Success' again — change detection does not work — the element is not re-rendered.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant