Currently, pagination seems to only be available for frontend data. I might have missed something in the documentation.
We have a Xano collection for example which is paginated on the backend - how do I work with this in the new datagrid? I can’t seem to find any way to use the pagination with backend.
Regarding the datagrid, it seems that the search filters and pagination are based on what’s been loaded in the collection.
In my case, I’m using Xano and if my first page (from Xano) is returning the first 100 records, then the datagrid will only consider those 100 records.
If the pagination of the datagrid is setup to show 20 records per page, we’ll have 5 pages in total for the navigation.
There is a “On Filter Changed“ action, which means we could trigger a new search in Xano to retrieve records based on the new filters.
But there is no “On Pagination Changed“ to trigger the next fetch in Xano.
In this case, what would be the best solution to load the next batch from Xano?
In the past I created a custom pagination bar to trigger new records to be fetched.
Right now I’m loading all records to simplify search filters and paginations but it’s not a good practice as it’s very resource intensive.
Would there be a better approach when dealing with a large dataset?
I’ve been puzzling over this myself. The best idea I’ve come up with is to use an array variable to supply the data for the datagrid, and make however many calls to my backend (Xano) needed to get all of the data to the frontend, but batched, so the user isn’t waiting for all of the data to load.
I managed to resolve this for my use case by combining the paginator with the datagrid. That said, it’s not ideal since I lose much of the datagrid’s built-in functionality (filtering, sorting, etc.), and end up having to handle those things manually.
For future releases, I think it would make sense to hold back on shipping a new datagrid until proper backend pagination is supported. In production environments with large datasets, it’s just not feasible to fetch everything at once and rely on frontend filtering/sorting. Pagination will always be required.
What’s a bit frustrating is that I often spend hours building my own custom solution for pagination, only to see a new release a few months later that supports it natively. Or alterntively a completely new datagrid with the old one depreciating.
Just rambling… Trying to be more active in the community:)