Files
payloadcms/test/e2e/fields/collections/Array/index.ts
2022-07-14 16:35:35 -07:00

45 lines
672 B
TypeScript

import type { CollectionConfig } from '../../../../../src/collections/config/types';
const ArrayFields: CollectionConfig = {
slug: 'array-fields',
fields: [
{
name: 'items',
type: 'array',
required: true,
fields: [
{
name: 'text',
type: 'text',
required: true,
},
],
},
],
};
export const arrayDoc = {
items: [
{
text: 'first row',
},
{
text: 'second row',
},
{
text: 'third row',
},
{
text: 'fourth row',
},
{
text: 'fifth row',
},
{
text: 'sixth row',
},
],
};
export default ArrayFields;