When a field is inside a row inside a collapsible field, it does not show up as one of the sortable props. I had the following definition (excerpt):
export const GeneratedContent: CollectionConfig = {
fields: [
{
type: 'collapsible',
label: 'Basic info',
fields: [
{
type: 'row',
fields: [
{
name: 'id',
type: 'text',
defaultValue: () => crypto.randomUUID(),
admin: {
readOnly: true,
width: '50%',
},
},
{
name: 'post_date',
type: 'date',
admin: {
description: 'Post date for the content (required when status is published)',
date: {
pickerAppearance: 'dayAndTime',
},
width: '50%',
},
},
],
},
],
},
],
};
but post_date would not show as a valid value for sort in my docs on http://localhost:3000/api/docs#tag/generated-content/GET/api/generated_content. It also didn't get added to the yaml and json variants of the docs.
Moving the post_date definition outside of the row and collapsable solved that.
npm list payload
payload-cms@1.0.0 /Users/jasperkennis/Projects/mylocation
├─┬ payload-oapi@0.2.5
│ └── payload@3.63.0 deduped
└── payload@3.63.0
When a field is inside a row inside a collapsible field, it does not show up as one of the sortable props. I had the following definition (excerpt):
but post_date would not show as a valid value for
sortin my docs on http://localhost:3000/api/docs#tag/generated-content/GET/api/generated_content. It also didn't get added to the yaml and json variants of the docs.Moving the post_date definition outside of the row and collapsable solved that.