-
Notifications
You must be signed in to change notification settings - Fork 373
$InfiniteLoading:reset and scroll event may trigger concurrent attemptLoad and force application to send two same ajax requests. #189
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
Comments
Could you provide a reproduce link? |
I have create one at codepen: https://codepen.io/dustinpt/pen/bmxMVm |
Hi @DustinPT , I think it is a expected result after test your demo over and over again. For example, a user visiting this official demo, he has browsed 3 pages then he scroll down and try to browse the 4th page, but the http request is always pending, so he decided change the news type to browse other news, if we ignore his action, until the So in this case, I think it is not send 2 same http request but is 2 different http requests, because the |
Hello @PeachScript , Our problem scene is different from what you said.
|
Hi @PeachScript, I'm facing the same problem, 2 same requests at the same page, on first load of infinite-loading and only when request status return 304 (not modified), I already updated to v2.4.1. At this component I'm using the default structure:
I can give more details if you need :) |
@lucassonsinlima is your problem caused by |
Noup, I thought in opening another issue to my problem but this is quite similar due to the double requests at loading. Do you prefer that I open another one with my infos? Thanks :) |
@lucassonsinlima that's great! Don't forget to provide a reproduce link in the new issue :P |
Two tab tags, one use vue-infinite-loading, the other isn‘t use。the component of not using vue-infinite-loading plugin slides to the bottom, then switch tab to the component of using vue-infinite-loading, there will be double request at loading with the same data |
@denglai please provide a reproduce link, thanks. |
Just dropping a note here, one workaround I have for this is to only add new elements by changing this.list = [
...this.list,
...data.filter(item => this.list.all(i => i.id !== item.id))
]; |
Uh oh!
There was an error while loading. Please reload this page.
Version
2.3.5
Vue.js version
2.5.16
Reproduction Link
https://codepen.io/dustinpt/pen/bmxMVm
Steps to reproduce
What is Expected?
snapshots
Two request snapshot from chrome dev tool:
First request:

Second request:

The text was updated successfully, but these errors were encountered: