45 lines
672 B
TypeScript
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;
|