We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd83b8b commit d9cc1d4Copy full SHA for d9cc1d4
packages/vue-virtual-scroller/src/components/RecycleScroller.vue
@@ -756,8 +756,20 @@ export default {
756
throw new Error('Rendered items limit reached')
757
},
758
759
+ isAnyVisibleGap () {
760
+ // Check if any view index is not in sequence (detect gaps)
761
+ return this.pool
762
+ .filter(({ nr }) => nr.used)
763
+ .every(({ nr }, i) => i === 0 || nr.index !== this.pool[i - 1].index + 1)
764
+ },
765
+
766
sortViews () {
767
this.pool.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index)
768
769
+ if (this.isAnyVisibleGap()) {
770
+ this.updateVisibleItems(false)
771
+ clearTimeout(this.$_sortTimer)
772
+ }
773
774
775
}
0 commit comments