Global setting for pagination?

default discord avatar
wiesson
6 months ago
2

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...
  • discord user avatar
    patrikkozak
    Payload Team
    6 months ago

    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
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.