Paul
e258cd73ef
feat: allow group fields to have an optional name (#12318)
Adds the ability to completely omit `name` from group fields now so that
they're entirely presentational.
New config:
```ts
import type { CollectionConfig } from 'payload'
export const ExampleCollection: CollectionConfig = {
slug: 'posts',
fields: [
{
label: 'Page header',
type: 'group', // required
fields: [
{
name: 'title',
type: 'text',
required: true,
},
],
},
],
}
```
will create
<img width="332" alt="image"
src="https://github.com/user-attachments/assets/10b4315e-92d6-439e-82dd-7c815a844035"
/>
but the data response will still be
```
{
"createdAt": "2025-05-05T13:42:20.326Z",
"updatedAt": "2025-05-05T13:42:20.326Z",
"title": "example post",
"id": "6818c03ce92b7f92be1540f0"
}
```
Checklist:
- [x] Added int tests
- [x] Modify mongo, drizzle and graphql packages
- [x] Add type tests
- [x] Add e2e tests
2025-05-14 23:45:34 +00:00
..
2025-03-14 17:13:08 +00:00
2025-04-07 14:06:03 -04:00
2025-04-14 09:47:08 +01:00
2025-03-14 17:13:08 +00:00
2025-04-23 16:55:42 -07:00
2025-04-17 15:23:17 -04:00
2025-04-29 13:23:49 +01:00
2025-03-14 17:13:08 +00:00
2025-01-06 00:43:53 +00:00
2025-05-14 23:45:34 +00:00
2025-05-01 12:52:23 -07:00
2025-03-21 09:04:11 -04:00
2025-03-22 15:50:42 +00:00
2025-05-12 17:06:37 -04:00
2025-03-31 15:00:36 -06:00
2025-03-14 17:13:08 +00:00
2025-04-14 13:05:16 +01:00
2025-03-21 09:04:11 -04:00
2025-05-13 13:20:46 -04:00
2025-04-04 12:41:54 -04:00
2025-05-05 23:17:04 +03:00
2025-04-23 16:55:42 -07:00
2025-03-14 17:13:08 +00:00
2025-04-06 01:13:56 +01:00
2025-03-14 17:13:08 +00:00
2025-03-21 09:04:11 -04:00
2025-05-05 23:16:14 +03:00
2025-04-17 14:45:10 -04:00
2025-03-14 17:13:08 +00:00