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
Hey @altanbln 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/issuesHey @jesschow 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
Discord
online
Get help straight from the Payload team with an Enterprise License.