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

Wrong :key used for Message demo? #40

@space88man

Description

@space88man

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions