Used this video reference: https://www.youtube.com/watch?v=jtdhOdCCzk8
I have set up my project with Firebase and Algolia, and have set up a functioning search page. I have set up an Algolia API call (built-in wasn't going to work because I need facets; custom code approach doesn't work with infinite scroll).
I have the API working, with pagination. Each search call returns 20 items. My list view only displays 2.5 on the screen at a time (yes, its a bit chunky, I'm showing events with pictures for each).
My issue is that when the page loads, it starts calling all of the extra pages of data right away, even if I don't scroll. My understanding was that it should load subsequent pages as the user scrolls and gets close to the end of the list. Right now I only have 150 items, so it does 8 calls in quick succession. And that number is expected to grow significantly.
Is this how the list view is supposed to work, or am I doing something wrong?
ListView + Algolia Search (API) + Inifinite Scroll => Too many searches
3
4 replies