-
Notifications
You must be signed in to change notification settings - Fork 214
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
No items fetched after fetching less than invisibleItemsThreshold items #311
Comments
Hi @KrisBraun. A page is only requested when the trigger index item ( |
Right. My use case is that I'd like to prefetch items early at an offset greater than the fetch page size (which is non-deterministic in my case). If there's a way to detect when new items are added, this could be handled by generating another fetch if the total remaining items is still below the threshold. |
You can listen to the pagecontroller, which will send a notification when new items are added. |
I think for that to work, I'd need a way to determine the number of invisible items given the current position, so I could trigger additional fetches if there are fewer than the threshold remaining. As far as I can tell, none of that is accessible through the PagingController. The cleanest solution from my perspective (external to the implementation) would be for the PagingController to fetch additional pages until it is above the threshold. |
This seems reasonable on the first glance I dont have time to specify this right now, but
|
Hit this issue when using
invisibleItemsThreshold = 20
with a fetcher that returns one item at a time.This code assumes a fetch only needs to be triggered when crossing the threshold, while further fetches may be required after that one completes.
The text was updated successfully, but these errors were encountered: