I’m using infinite scroll to fetch new elements and extend my page. When the user applies a filter, I want to cancel any in progress fetches. Otherwise they will load on the page and won’t match the current filter.
Is there a way to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how I ended up solving it.
Set a global variable
midFilter, and remove all returned items via the infinite-scroll callback function.