From 9043728aeb4a03c2fc210d3ee9c47d25739b0f98 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Sat, 23 May 2020 09:51:05 +0300 Subject: [PATCH] add key for rendering items it will increase speed of VNode-Dom comparison and patch for example for list of images when new slots added to the list only these images will requested (at this moment all 30 will be requested) --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 540a995..1cc4b61 100644 --- a/src/index.js +++ b/src/index.js @@ -269,6 +269,7 @@ const VirtualList = Vue.component('virtual-list', { if (dataSource) { if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) { slots.push(h(Item, { + key: dataSource[dataKey], props: { index, tag: itemTag,