Im convinced there is something missing in the current documentation that WeWeb provides regarding external pagination because I have followed the documentation exactly as it is laid out, double checked, triple checked, and still no luck.
As you can see below, my collection has all of the needed information returning from Xano:
On my Paginator element, everything is connected to the correct fields:
Total Items:
Items per page:
Offset:
I’ve also got a paginator variable created as instructed:
You can see here that the Paginator element has an “On Change” workflow associated with it:
As instructed, the workflow updates the paginator variable to the “Event” followed by re-fetching the collection from Xano.
And, as you can see, I’ve got the collection inputs bound to the paginator variable as instructed:
page input:
offset input:
So what’s the problem?
This is Page 1 of the results, sorted by lowest price to highest price. As you can see by the screenshot below, the most expensive on this page is $148:
So when I click on Page 2, I expect the first result to be around that $149 price. However, the starting price on Page 2 is actually $199, a nearly $50 price jump:
Here you can see the last number on Page 2 is $250:
But guess what happens on Page 3? It jumps to $328:
So it’s pretty clear that products are being skipped over, which makes sense because for some reason the WeWeb documentation has us sending an “offset” value. So if we are seeing 100 items per page, WeWeb’s documentation is telling me that when a request for page 2 is sent to Xano, we also set the offset value to “100” which will skip over the next 100 items. The problem only grows as the page count gets higher. Page 3’s offset value will be 200!
This means that instead of the 7 page count you see at the beginning (which is accurate), the results actually end on page 4. Only, when you are on page 4, the paginator suddenly shows you are on a page 10, with a max of 21 pages:
And once I click on that “24” page I’m then on page “Infinity” which is clear there is something wrong.
Any solutions to this?