Skip to content

Commit afb118a

Browse files
committed
Fix infinite trigger bug when using keep-alive feature #40
1 parent 746ffa1 commit afb118a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/InfiniteLoading.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@
115115
setTimeout(this.scrollHandler, 1);
116116
});
117117
},
118+
/**
119+
* To adapt to keep-alive feature, but only work on Vue 2.2.0 and above, see: http://vuejs.org/v2/api/#keep-alive
120+
*/
121+
deactivated() {
122+
this.isLoading = false;
123+
},
118124
methods: {
119125
attemptLoad() {
120126
const currentDistance = getCurrentDistance.bind(this)(this.scrollParent, this.direction);

0 commit comments

Comments
 (0)