Files
payload/test/fields/collections/Row/index.ts
2023-03-07 10:34:21 -05:00

33 lines
597 B
TypeScript

import type { CollectionConfig } from '../../../../src/collections/config/types';
export const rowFieldsSlug = 'row-fields';
const RowFields: CollectionConfig = {
slug: rowFieldsSlug,
versions: true,
admin: {
defaultColumns: ['title', 'id'],
},
fields: [
{
name: 'id',
label: 'Custom ID',
type: 'text',
required: true,
},
{
type: 'row',
fields: [
{
name: 'title',
label: 'Title within a row',
type: 'text',
required: true,
},
],
},
],
};
export default RowFields;