vue-infinite-scroll
vue-infinite-scroll copied to clipboard
Not able to call method after a few times
A simple example on adding new records with each 'loadMore' method upon infiniteScroll.
Strangely though, inside my chrome, adding 25 records per event will only allow me to infiniteScroll twice. This behavior seems to be similar when i only add 10 records. But adding 20, 40, or even 100 records per event will allow me to infiniteScroll infinitely. See ADD_ROW_AMOUNT for the amount of records constant.
https://jsfiddle.net/kvcphx01/4/
For the time being, i will stick to either 40 or 100.
This doesn't repro for me on the jsFiddle you provided. Can you still repro it?
Yes, i just tried it now without any code modifications.
- Open the fiddle
- Notice that there's 50 records before any scrolling
- Now scroll till the end, a load-more event results in a popup, just click to continue
- Scroll again till the end, a load-more event results in another popup, just click to continue
- Scroll again till the end, and load-more event is not fired anymore
Conclusion with the default example: Load-more event fires only 2 times, and then not firing anymore.
I tried changing the code from i <= end to i < end, and it can loadMore 3 times before not firing any loadMore event.
Also try changing ADD_ROW_AMOUNT to 40, it'll fire loadMore repeatedly just fine.
Google chrome Version 58.0.3029.110 (64-bit), Debian Jessie
Thank you for taking your time to test this out.