fix(next): admin panel UI not rendering custom upload components (#9925)
### What? Currently it is not possible to override the upload component. ### Why? The ability to override the upload component is missing from `renderDocumentSlots`. ### How? Adding a check to include the custom upload component if it is available. This issue is holding me back from releasing a payload plugin. Fixes #9591
This commit is contained in:
@@ -115,6 +115,14 @@ export const renderDocumentSlots: (args: {
|
||||
}
|
||||
}
|
||||
|
||||
if (collectionConfig?.upload && collectionConfig?.admin?.components?.edit?.Upload) {
|
||||
components.Upload = RenderServerComponent({
|
||||
Component: collectionConfig.admin.components.edit.Upload,
|
||||
importMap: req.payload.importMap,
|
||||
serverProps,
|
||||
})
|
||||
}
|
||||
|
||||
return components
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user