Like what we’re doing? Star us on GitHub!

Global setting for pagination?

2 weeks ago

It looks like I can't set the pagination globally despite the types allow it.

I'd like to add:

pagination: {
    defaultLimit: 100,
    limits: [100, 250, 500, 1000],

but somehow it doesn't work:

[15:47:44] ERROR (payload): There were 1 errors validating your Payload config
[15:47:44] ERROR (payload): 1: "admin.pagination" is not allowed
[nodemon] app crashed - waiting for file changes before starting...
  • patrikkozak
    Payload Team
    last week

    Hey @wiesson! After some digging, we realized the type is wrong for the top level admin config. However, pagination should still work on a collection basis. We will keep this in mind and fix the type issue soon. If you want to open a feature request on Github - to allow for pagination in a global setting - we will get to it as soon as we can.

    Thank you for bringing this up!

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More