We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd51403 commit 7c809adCopy full SHA for 7c809ad
packages/vue-virtual-scroller/src/components/RecycleScroller.vue
@@ -690,10 +690,11 @@ export default {
690
691
scrollToItem (index) {
692
let scroll
693
+ const gridItems = this.gridItems || 1
694
if (this.itemSize === null) {
695
scroll = index > 0 ? this.sizes[index - 1].accumulator : 0
696
} else {
- scroll = Math.floor(index / this.gridItems) * this.itemSize
697
+ scroll = Math.floor(index / gridItems) * this.itemSize
698
}
699
this.scrollToPosition(scroll)
700
},
0 commit comments