PeachScript / vue-infinite-loading

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

Event "infinite" called twice when in tabs and scroll position is not 0 #228

Open nirmalraghavan opened 5 years ago

nirmalraghavan commented 5 years ago

Version

latest

Vue.js version

2.5.17

Reproduction Link

https://codepen.io/anon/pen/NoYrwx?editors=1111

Steps to reproduce

  1. When in Tab 1, scroll to bottom a little.
  2. From that scroll position switch to Tab 3.

What is Expected?

Event 'infinite' will trigger only once

What is actually happening?

Event 'inifinte' called twice and axios fetched same results twice

PeachScript commented 5 years ago

Hi @nirmalraghavan , sorry for late. This problem should be fixed in the v2.4.4, you can try it now.

PeachScript commented 5 years ago

And thanks for your detailed reporting ❤️

ChangeZhang commented 2 years ago

2.4.5这个问题依然存在