Skip to content

Commit 0ccc944

Browse files
authored
Merge pull request #1 from arjanwestdorp/patch-1
Added option to reset the infinite loader
2 parents 1762d37 + 42ae908 commit 0ccc944

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/InfiniteLoading.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@
9292
this.isNoMore = true;
9393
this.scrollParent.removeEventListener('scroll', this.scrollHandler);
9494
},
95+
'$InfiniteLoading:reset'() {
96+
this.isLoading = false;
97+
this.isNoMore = false;
98+
this.isNoResults = false;
99+
this.scrollParent.addEventListener('scroll', this.scrollHandler);
100+
101+
this.scrollHandler();
102+
},
95103
},
96104
destroyed() {
97105
if (!this.isNoResults && !this.isNoMore) {

0 commit comments

Comments
 (0)