Hi all, I upgraded from Payload v1.8.2 to v.1.15.2 and everything looks fine except on one of my collections I am getting a lot of these messages in my console log:
react-dom.development.js:86 Warning: You provided a
checked
prop to a form field without an
onChange
handler. This will render a read-only field. If the field should be mutable use
defaultChecked
. Otherwise, set either
onChange
or
readOnly
.
One of the checkbox fields affected is this one:
{
name: 'displayCreationImages',
type: 'checkbox',
defaultValue: false,
admin: {
description: 'example description',
},
},
I've checked the Payload docs and it seems to be correct so I'm not sure what's causing the errors.
Can anyone advise on how to fix this please?
Yeah I think there is a ticket pulled for this, if not I am getting v annoyed by it and will likely fix it today.
PR here:
https://github.com/payloadcms/payload/pull/3291Hey @dh3627 just an FYI the PR that fixes this was merged - so make sure you have the latest update and you should be good to go.
Thanks guys, I'll update later today and give it a try
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.