Skip to content

Issue when using cacheable components (<keep-alive>) #40

Closed
@nlocascio

Description

@nlocascio

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:

  1. Click "Go to Bar" to activate the Bar component.
  2. Immediately click "Go to Foo". This will deactivate/cache Bar and replace it with Foo.
  3. In dev console, you'll see that onInfinite continues to run.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions