ElemeFE / vue-infinite-scroll

An infinite scroll directive for vue.js.
2.86k stars 417 forks source link

Problems with "page" variable #153

Open alexsantm2019 opened 3 years ago

alexsantm2019 commented 3 years ago

Hi everyone,

The component works fine in my view, however I have a problem with the variable "page". It happens that I have a component that has nested filters, and when I call an API, it returns the results without problems; I scroll, and it brings me data by pages (everything OK). When I change the filter (by dates), the "page" variable is set with the last value of the previous API call, and therefore, sometimes the results are empty. How can I improve the treatment of the "page" variable, so that every time I ask for a new filter, it stays at 1?

Thanks in advanced