Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Global setting for pagination?

default discord avatar
wiesson2 years 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
    2 years ago

    Hey

    @525819893333884938

    ! 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!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.