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 304df9f commit a21c674Copy full SHA for a21c674
src/index.js
@@ -76,7 +76,7 @@ const VirtualList = Vue.component(NAME, {
76
// set current scroll position to a expectant index
77
scrollToIndex (index) {
78
// scroll to top
79
- if (index === 0) {
+ if (index <= 0) {
80
this.scrollToOffset(0)
81
} else if (index >= this.dataSources.length - 1) {
82
// scroll to bottom
@@ -100,7 +100,7 @@ const VirtualList = Vue.component(NAME, {
100
if (this.getOffset() + this.getClientSize() < this.getScrollSize()) {
101
this.scrollToBottom()
102
}
103
- }, 3);
+ }, 3)
104
105
},
106
0 commit comments