Skip to content

Commit aaa62de

Browse files
committed
refactor: improve reset logic
1 parent f14329f commit aaa62de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/InfiniteLoading.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ export default {
194194
});
195195
196196
this.$on('$InfiniteLoading:reset', (ev) => {
197+
this.status = STATUS.READY;
198+
this.isFirstLoad = true;
199+
scrollBarStorage.remove(this.scrollParent);
197200
this.scrollParent.addEventListener('scroll', this.scrollHandler, evt3rdArg);
198201
199202
// wait for list to be empty and the empty action may trigger a scroll event
200203
setTimeout(() => {
201-
this.status = STATUS.READY;
202-
this.isFirstLoad = true;
203204
throttleer.reset();
204-
scrollBarStorage.remove(this.scrollParent);
205205
this.scrollHandler();
206206
}, 1);
207207

0 commit comments

Comments
 (0)