fix(plugin-import-export): collectionSlug field regression from hidden field changes (#13917)

### What?

- Fixes collectionSlug field not being populated, breaking export
downloads
- Works around recent UI changes that prevent custom components from
rendering for `admin.hidden` fields
- Removes `admin.hidden: true` - as the component already ensures a
hidden state by returning `null`

### Why?

- This merged [PR](https://github.com/payloadcms/payload/pull/13869)
changed how `admin.hidden` fields are rendered, causing them to bypass
custom field components entirely. The `collectionSlug` field relied on a
custom `CollectionField` component to set its value from the
ImportExportProvider context.

### How?

- Removes `admin.hidden: true`
- Field remains visually hidden with `null` return but custom component
logic now executes properly
This commit is contained in:
Patrik
2025-09-24 09:01:02 -04:00
committed by GitHub
parent 79b25577b9
commit 96c66125dd
2 changed files with 1 additions and 2 deletions

View File

@@ -224,7 +224,6 @@ export const getFields = (config: Config, pluginConfig?: ImportExportPluginConfi
components: {
Field: '@payloadcms/plugin-import-export/rsc#CollectionField',
},
hidden: true,
},
required: true,
},

View File

@@ -198,7 +198,7 @@ export interface Page {
root: {
type: string;
children: {
type: string;
type: any;
version: number;
[k: string]: unknown;
}[];