-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomUpload component not used #10281
Comments
Hey @tylkomat, So this may be related to/possible duplicate of #9591. The root of the issue is that the map of components to override with, currently, does not check for or add a custom upload component. You can add one in config, have the importMap pick it up, but it will not be rendered as it's simply not included in the rendering of fields. There's a PR attached to the aforementioned issue that should do exactly that. All the Hopefully that PR gets looked at soon though! |
Yes, it is a duplicate. Sorry, didn't see the other issue. |
In the interim I have been using the below
|
Describe the Bug
A custom Upload component configured in an upload activated collection via
admin.components.edit.Upload
is not used. Only the defaultUpload
component is used.The Problem lies here: https://github.com/payloadcms/payload/blob/main/packages/ui/src/elements/BulkUpload/EditForm/index.tsx#L160
The
||
syntax is not valid for react components, it should be?:
.Link to the code that reproduces this issue
https://github.com/tylkomat/payload/tree/bug-custom-upload
Reproduction Steps
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: