We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89b8890 commit e40294eCopy full SHA for e40294e
packages/vue-virtual-scroller/src/components/RecycleScroller.vue
@@ -741,8 +741,20 @@ export default {
741
throw new Error('Rendered items limit reached')
742
},
743
744
+ isAnyVisibleGap () {
745
+ // Check if any view index is not in sequence (detect gaps)
746
+ return this.pool
747
+ .filter(({ nr }) => nr.used)
748
+ .every(({ nr }, i) => i === 0 || nr.index !== this.pool[i - 1].index + 1)
749
+ },
750
+
751
sortViews () {
752
this.pool.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index)
753
754
+ if (this.isAnyVisibleGap()) {
755
+ this.updateVisibleItems(false)
756
+ clearTimeout(this.$_sortTimer)
757
+ }
758
759
760
}
0 commit comments