-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when using cacheable components (<keep-alive>) #40
Comments
Thank you @nlocascio , I will find the real reason and fix it. |
Hi @nlocascio , I have been released a new version But it only works with Vue.js const AliveComponent = {
...
template: '#bar',
deactivated() {
this.$refs.yourInfiniteLoading.isLoading = false;
},
}; |
@PeachScript - thanks for pushing the update. I had been thinking of approaching this issue through the distance detection logic in |
It sounds interesting! I will think about this problem according to your thoughts, perhaps can solve the compatibility problem, keep in touch. |
I found the key point in the source code of |
I'm having this issue still with the newest version (in fact worse after upgrading from 2.0.0 rc5) My case is a little different though. I have a keep alive page with an infinite loader, and other router-views have infinite loaders as well. The loaders emitting events in the other pages are triggering my keep alive component's loader. Here is a an example modified from your previous one: I'm guessing it's because these are global events. Is there a current limitation of not being able to have two of these active at once? I haven't looked too deeply at the source, but a quick solution might be to have the events keyed or to call |
Hi, I am not sure if this is the same problem that I have. I am using vue-inifinite-loading 2.1.1 and define router lazy loading The $InfiniteLoading:loaded' event keeps getting called until my browser crash, never stops. I have to switch back to normal router without the lazy loading and everything's working fine. |
@duyhung85 could you reproduce the problem on JSFiddle or other website like it? |
@stephantabor sorry, I missed your comment, I will reply as soon as possible. |
@stephantabor , the real reason is, this plugin always listen the scroll event, no matter it be I have released Thanks for your feedback! |
Hi @PeachScript , I updated to v2.1.3 as you suggested and it fixed my issue. Thanks |
@duyhung85 you are welcome :) |
When using vue-infinite-loading in a cacheable component inside of
<keep-alive>
, the component will sometimes trigger onInfinite indefinitely while the parent component is inactive (cached).You can recreate the condition using this jsfiddle:
I ran into this issue usiung Vue-Router and
<keep-alive>
to cache components, and found that the infinite loader would keep runing on cached components.The text was updated successfully, but these errors were encountered: