-
Notifications
You must be signed in to change notification settings - Fork 18
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
Custom API pagination | All requests from all pages are executed one after the other without us having scrolled to trigger them. #2433
Comments
same here |
please triage this |
Hey @valentin-mourtialon thanks for your report. I just implemented a quick app fetching the products from DummyJson and it's working correctly for me on Test, Run and Deploy. |
Hi @ignalauret , hi @diegoserranobst 👋 We finally found out the issue. The post that helped us solve the problem is the following: https://community.flutterflow.io/ask-the-community/post/infinite-scroll-pagination-not-working-NzCZOXaBXFeI89o. In his latest post, the author claims to have solved the problem by, and I quote, "simplifying his widget tree". That's pretty much what we've done on our side. Our Listview was in a "scrollable" column set to "primary" mode while our Listview was "NOT expanded", "non primary" and "shrink wrap". So we made the following changes:
That's what worked for us. Hope it helps. |
I see, the ListView was trying to render entirely so it fetched all the pages it could. I'm glad you where ever to figure it out, thanks for sharing the solution for anybody else that falls into the same issue. |
Has your issue been reported?
Current Behavior
In the FlutterFlow interface, we have enabled pagination for one of our ListViews that retrieves data from a custom API. We have noticed something strange in test mode:
We observed this with the network tab of the dev tools.
We made sure that the issue did not originate from our API by conducting internal tests and also by replicating the bug with the DummyJson API on an endpoint that supports pagination.
Expected Behavior
The behavior we were expecting is that the requests would only be made on demand, so on scroll. Although the data appears on the interface as soon as the first page is loaded, it significantly and unnecessarily overloads the backend.
Steps to Reproduce
On a blank project:
Reproducible from Blank
Bug Report Code (Required)
ITEelM/luItJpb1K1pPccvl4rwMwJ0QlUIInj+0bWRMhfZDwPZoXO8mkahJLYteeSlBUBlf8rFo0pPDuivLpUcc6GE+ZfNVZz5RXQQqUVmSVR7nQEYe8PmtRI/xNCW6b17eNgRN/NfVZW0Ih2l2UPPCdG3qCf9qOYwx5e6fDbOY=
Context
Although the data appears on the interface as soon as the first page is loaded, it significantly and unnecessarily overloads the backend.
At the moment, we only use pagination to fetch lightweight data, but we would like to implement it for heavier types of data, such as images.
Visual documentation
The full video is too large to upload, but we've already sent it to a member of your team.
Additional Info
In the following issue, it seems to me that the user of this GitHub issue doesn't have quite the same problem because it appears he has the same pageNumber on each call, whereas we do not (see the video I sent you).
Environment
The text was updated successfully, but these errors were encountered: