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.

Bug? saveToJWT ignored when used within a type 'tab' field

default discord avatar
altanbln2 years ago
2

I've recently encountered a problem where fields that have

saveToJWT

set to true were not available for a

defaultValue

function in the payload admin when they were defined within a tabbed field.



I'm not sure if this is intended? but definitely threw me off and took me some time to debug. I encountered this when working off of code from the access-control-demo (

https://github.com/payloadcms/access-control-demo

). When I copy the

roles

field defined for users as

tabbedRoles

, move them into a tab. the values are not available for the

defaultValue

function

  • default discord avatar
    jessrynkarlast year

    Hey

    @190191205907169280

    is this still happening on the latest version of Payload? If so, could you open an issue for us over on GitHub? It doesn't sound like intended behavior.

    https://github.com/payloadcms/payload/issues
  • default discord avatar
    altanblnlast year

    Hey

    @854377910689202256

    I've just tested this with the latest version of Payload. The defaultValue is populated as expected for fields within a tab, so I guess this bug is resolved!

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.