field.admin.condition
data
attribute missing document ID when document is being edited
#10379
Labels
field.admin.condition
data
attribute missing document ID when document is being edited
#10379
Describe the Bug
The
data
attribute passed tofield.admin.condition
functions is missing the document ID when the function is executed in the context of formData changes, but not when the document is loaded. This is a breaking change at least from v2.Link to the code that reproduces this issue
https://github.com/payloadcms/payload/compare/franciscolourenco:reproduce-condition-missing-document-id
Reproduction Steps
Check included e2e test
field.admin.condition
function that relies on the document ID (eg.(data) => data.id
)data.id
is defined when the document is loaded, butundefined
after any changes are made to the document, until the document is saved again.Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: