Skip to content

<transition-group> children must be keyed: <div> #144

Closed
@afuno

Description

@afuno

Slim:

template id='blocks-template'
	draggable v-model="blocks"
		transition-group
			div v-for="block in blocks" :key="block.id"
				| {{block.id}}

HTML:

<draggable v-model="blocks">
	<transition-group>
		<div :key="block.id" v-for="block in blocks">{{block.id}}</div>
	</transition-group>
</draggable>

Without this part of the code, everything works: <transition-group>.

Once I put the code in it, I get an error:

[Vue warn]: <transition-group> children must be keyed: <div>

I do not understand what this phrase means:

children must be keyed

What should I do with the div? I placed the div before and after thetransition-group. It did not change anything.

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