Skip to content

Commit cb65a5e

Browse files
committed
README.md: Example sets up :key in the v-for loop
This avoids a warning: grid-item v-for="item in layout">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.
1 parent e813126 commit cb65a5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ Include the browser-ready bundle (download from [releases](https://github.com/jb
149149
:y="item.y"
150150
:w="item.w"
151151
:h="item.h"
152-
:i="item.i">
152+
:i="item.i"
153+
:key="item.i">
153154
{{item.i}}
154155
</grid-item>
155156
</grid-layout>
@@ -465,6 +466,7 @@ Working example [here](https://jbaysolutions.github.io/vue-grid-layout/examples/
465466
:w="item.w"
466467
:h="item.h"
467468
:i="item.i"
469+
:key="item.i"
468470
@resize="resizeEvent"
469471
@move="moveEvent"
470472
@resized="resizedEvent"

0 commit comments

Comments
 (0)