Collection from Supabase: Pagination bug

Hello,

Is anyone else facing an error like this when trying to fetch a collection from supabase?
Setting pagination to 25, all items past 25 is null…

@jaredgibb I think reported this like a year ago. It’s crazy that it hasn’t been solved/managed yet.

Edit: Here is the thread with a … sort of an answer.

1 Like

:astonished: Thanks @Broberto . I asked for an update in the thread you sent.

Because you are on the first page, once you go to the second page through pagination 25-50 will be filled.

If you bind the collection you should get only the items related to the current page. Do you get something else ? Internally we create an array that contain as many items as you have in your whole unpaginated collection, filled with null value, it’s what show up here.

The issue is that the nulls aren’t from the db but from the WeWeb’s plugin

1 Like

indeed, I get something else… when I bind the collection, i get the message:
image
it tries to read the properties of the null data in the array…

Which property are you trying to bind ? I don’t get why it’s trying to get a date property

I use this collection in a table, where in a certain filed, I get the item.data.date for example. But The problem is, I think, because it tries to get date from the null value inside the collection…

In a Datagrid element ?

You can fill a ticket on support.weweb.io with everything required to reproduce it on your project (like credentials), it would be easier to debug for us

I saw your answer here. I bind it directly to the collection, but even like this, it seems all null values are passed.

It is a table element actually

@Alexis I have just tested the same collection with another table element, And it created 25 repeated items with no issues with the null ones… There may be a problem with Table in use, I believe. Later today I will search deeper what the problem is. I will update the thread accordingly. It is very weird, because the table element hadn’t been changed in a while, and until Thursday it worked fine. Well, we’ll see.

1 Like

Is there any way to do something like infinite scroll? Without the user being able to specify the offset, it becomes hard to do any pagination that doesn’t use WeWeb’s pagination element.