Files
payloadcms/test/fields/collections/Array/shared.ts
Alessio Gravili ccbaee43cc feat!: various type improvements (#6385)
**BREAKING:**
- Type narrowing for `relationTo` props on filterOptions, relationship
fields and upload fields
- Type narrowing for arguments of lexical relationship, link and upload
features
2024-06-24 16:38:46 -04:00

69 lines
1.0 KiB
TypeScript

import type { RequiredDataFromCollection } from 'payload/types'
import type { ArrayField } from '../../payload-types.js'
export const arrayDoc: RequiredDataFromCollection<ArrayField> = {
arrayWithMinRows: [
{
text: 'first row',
},
{
text: 'second row',
},
],
collapsedArray: [
{
text: 'initialize collapsed',
},
],
items: [
{
text: 'first row',
},
{
text: 'second row',
},
{
text: 'third row',
},
{
text: 'fourth row',
},
{
text: 'fifth row',
},
{
text: 'sixth row',
},
],
title: 'array doc 1',
}
export const anotherArrayDoc: RequiredDataFromCollection<ArrayField> = {
arrayWithMinRows: [
{
text: 'first row',
},
{
text: 'second row',
},
],
collapsedArray: [
{
text: 'initialize collapsed',
},
],
items: [
{
text: 'first row',
},
{
text: 'second row',
},
{
text: 'third row',
},
],
title: 'array doc 2',
}