payload
payload copied to clipboard
Add new from Join Field does not honor default or conditions
Describe the Bug
Add new from Join Field:
Create new from Collection:
export const Resources: CollectionConfig = {
slug: 'resources',
fields: [
{ name: 'id', type: 'text', required: true },
{ type: 'row', fields: [
{ name: 'type', type: 'select', options: ['data', 'content'], required: true, defaultValue: 'data' },
{ name: 'dataset', type: 'relationship', relationTo: 'datasets', required: true },
]},
{ name: 'markdown', type: 'code', admin: { language: 'markdown', condition: data => data.type === 'content' } },
{ name: 'data', type: 'json', required: true },
],
}
Link to the code that reproduces this issue
https://github.com/nathanclevenger/payload-repro/blob/main/collections/Resources.ts
Reproduction Steps
In this example, select Add new
for Resources from within a detail view of an item in the Datasets
collection, and the default and condition behavior is not honored, like it is if you create a new Resource directly from the Collection Create New
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Payload: 3.0.0-beta.126 Node: v20.13.1 Next: 15.0.0