Limit of displayed items

Hi,
in my project, I have 2 pages with each a collection / list of items. In the first page, all 25 items out of 25 are displayed (screenshot 1).

But in my second page, only 10 items of 100 are displayed (screenshot 2).

Backend is a REST API (Baserow) and as far as I know, I did not select any pagination or so.

Where can I change / reset this limit of 10 ?

Hi Wim :waving_hand:

It seems you are applying a filter to your collection, which will return less items.

Can you check if that’s the case?

Hi @Agustin_Carozo ,

thanks for the suggestion; there was a filter but even after removing that filter, not all the records are retrieved.
I looked further and it seems that the GET API only retrieves the first 100 records (without filter !) and there are 104 records in Baserow Table.
There’s also no pagination, so I would think that Weweb should retrieve all 104 records.

BASEROW-table with 104 records:

Weweb only retrieving (first) 100 records, without filter and without pagination

Hi @WimDC :waving_hand:

I think this might be due to how Baserow’s own API works. It seems that, by default, it only returns 100 items (see Baserow’s user docs on the topic):

1 Like

Hi @Joyce ,

thanks for your help and after adding “&size=200” to my GET API, I got all the records from my table. (There are only ± 130 records in my table). So this problem is solved !
BUT…
What if my table increases and after a while I have ± 250 records? Baserow’s own API only gives a maximum size of 200 records. In there community people suggest to work with pagination.
But how do I implement this in Weweb to have a collection with all 250 records to work with?
**
Anyone who has experience with this (Baserow free plan / more than 200 records / Weweb frontend) ?**

Hey @WimDC :waving_hand:

I don’t have an active Baserow project to test this with but, from what I can see in their user docs, you can pass a `page` parameter when you make the API call.

So one way you could setup pagination is to have a list of item in WeWeb, a `Page` variable with a default value of 1 and two buttons: “Previous page” and “Next page”

When the `Page` variable is 1, the “Previous page” button is hidden. When user clicks on “Previous page” or “Next page”, the `Page` variable is updated with -1 or +1 and the collection is refetched.

Does that make sense?

Hi @Joyce ,

Thanks and I think I understand how to do this.

This makes sense in some cases (like with the buttons you mention).

But what if I want to build an app (for example) where users could select some filter-values and want to see all the filtered records. Suppose (not obvious but possible) that applying a filter results in 2 records : recnr 10 and recnr 290. How would it be possible to show those 2 records at once (without 3 seperate paginated GET-api?

I’m not 100% sure I understand the use case.

Are you thinking of something like:

  • list of real estate properties
  • user can search for a city
  • baserow needs to return properties for that city only?

If that’s the case, the answer should be in Baserow’s API documentation: Baserow Database API documentation

From what I can see, it’s possible to combine filters and pagination with their API.

If I were you, I’d start building and address each use case as it comes along. If you get stuck along the way, you can always share screenshots and/or short videos to explain where you’re stuck and I’m sure people will jump in to help.

You did understand my use case 100% :slight_smile:

For those who also use Baserow (and for me to remember :innocent: ) : for filtering you have to add something like this to the GET API :

?user_field_names=true&filter__TYPE_REP_ACT__contains=OPT (where TYPE_REP_ACT is the field name and OPT is the value

Possible filter operators : Filter rows by field values in Baserow

1 Like

Aaah beautiful, thanks for taking the time to share this on here. I’m sure it’ll help others :grinning_face: