Skip to content

Commit de2d1b1

Browse files
committed
Handle variable height start index in mounted.
1 parent a2595fc commit de2d1b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
mounted: function () {
8080
if (this.start && this.validStart(this.start)) {
81-
this.setScrollTop(this.start * this.size)
81+
this.setScrollTop(this.variable ? this.getVarOffset(this.start) : this.start * this.size)
8282
}
8383
},
8484

@@ -268,7 +268,7 @@
268268
return start === parseInt(start, 10) && (start >= 0 && start < this.delta.total)
269269
},
270270

271-
// set manual scrollTop
271+
// set manual scrollTop.
272272
setScrollTop: function (scrollTop) {
273273
this.$refs.vsl.scrollTop = scrollTop
274274
},

0 commit comments

Comments
 (0)