Skip to content

Commit d91ef28

Browse files
committed
fix: update when the items changes, fix #866
1 parent 61b9919 commit d91ef28

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/vue-virtual-scroller/src/components/RecycleScroller.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,13 @@ export default {
245245
},
246246
247247
watch: {
248-
items () {
248+
items (newItems, oldItems) {
249+
if (newItems !== oldItems && newItems.length === oldItems.length) {
250+
this.updateVisibleItems(true)
251+
}
252+
},
253+
254+
'items.length' () {
249255
this.updateVisibleItems(true)
250256
},
251257

0 commit comments

Comments
 (0)