Files
payload/test/localization/collections/NestedArray/index.ts
Sasha 704518248c fix(db-postgres): reordering of enum values, bump drizzle-kit@0.31.0 and drizzle-orm@0.43.1 (#12256)
Fixes the issue when reordering select field options in postgres by
bumping `drizzle-kit` and `drizzle-orm`, related PR
https://github.com/drizzle-team/drizzle-orm/pull/4330
```
cannot drop type enum_users_select because other objects depend on it
```

fixes https://github.com/payloadcms/payload/discussions/8544
2025-06-16 16:03:18 -04:00

67 lines
1.7 KiB
TypeScript

import type { CollectionConfig } from 'payload'
export const NestedArray: CollectionConfig = {
slug: 'nested-arrays',
versions: {
drafts: true,
},
fields: [
{
type: 'tabs',
tabs: [
{
label: 'My Tab',
fields: [
{
name: 'arrayWithBlocks',
type: 'array',
localized: true,
fields: [
{
name: 'blocksWithinArray',
type: 'blocks',
blocks: [
{
slug: 'someBlock',
fields: [
{
name: 'relationWithinBlock',
type: 'relationship',
relationTo: 'localized-posts',
},
{
name: 'myGroup',
type: 'group',
fields: [
{
name: 'text',
type: 'text',
},
],
},
],
},
],
},
],
},
{
name: 'arrayWithLocalizedRelation',
type: 'array',
dbName: 'arr_rel',
fields: [
{
name: 'localizedRelation',
type: 'relationship',
localized: true,
relationTo: 'localized-posts',
},
],
},
],
},
],
},
],
}