PeachScript / vue-infinite-loading

An infinite scroll plugin for Vue.js.
https://peachscript.github.io/vue-infinite-loading/
MIT License
2.66k stars 366 forks source link

Scrolling past loader does not stop @infinite from being triggered #292

Open johannes-z opened 4 years ago

johannes-z commented 4 years ago

Version

2.4.5

Vue.js version

2.6.11

Reproduction Link

-

Steps to reproduce

I have a table with groups. When you expand a group, data is being loaded. If you scroll open the group but scroll past the vue-infinite-loading component, it will keep triggering @infinite even though the component is not in the viewport anymore.

What is Expected?

If the scroll is past the component (i.e. the component is not in the viewport anymore) it should not trigger anymore events.

What is actually happening?

This issue causes the group's data to be downloaded in its entirety.

The only workaround I could think of is hiding the vue-infinite-loading component manually if it's not in the viewport anymore...