Skip to content

fix(plugin-import-export): use selected collection in export preview#16652

Open
OskarMichalkiewicz wants to merge 1 commit into
payloadcms:mainfrom
OskarMichalkiewicz:fix/import-export-preview-collection-slug
Open

fix(plugin-import-export): use selected collection in export preview#16652
OskarMichalkiewicz wants to merge 1 commit into
payloadcms:mainfrom
OskarMichalkiewicz:fix/import-export-preview-collection-slug

Conversation

@OskarMichalkiewicz
Copy link
Copy Markdown

What?

When navigating to export collection from admin menu list the preview component is always empty.

Why?

ExportPreview component from plugin-import-export uses currently opened collection slug to determine the target for the export preview fetch. When navigating to export collection from admin menu list the collectionSlug variable sent in the request body for /export-preview is always exports.

How?

Use collectionSlug from useFormFields as the primary source for /export-preview payload only falling back to the currently opened collecions slug when the form field is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant