Overwrite default edit view
Link to reproduction
https://github.com/payloadcms/payload/compare/main...dkirchhof:payload:custom-edit-view-test
Describe the Bug
Hello,
I want to extend the default edit view of a collection, so first I copied the original edit view and added it to the collection admin config. While opening the edit page of the collection, everything works fine. While opening this view in a drawer, the application will crash.
It seems that the component will be rendered with different props as the original one.
Related issue: https://github.com/payloadcms/payload/issues/4900
To Reproduce
Clone the linked repo and run pnpm dev admin.
Working example:
- Open the
Test2collection in the admin panel. - Create a new doc.
Not working:
- Open the
Testcollection in the admin panel. - Create a new doc and select a
Test2doc in the relation field. - See error logs in the console.
Some missing props (like permissions) are causing errors in the DocumentControls and DocumentFields components of my custom edit view.
Payload Version
2.8.2
Adapters and Plugins
No response
@dkirchhof are you able to confirm if this is still an issue in v3?
This issue was automatically closed due to lack of activity. If this issue is still relevant against the latest codebase, please create a new issue.
Didn't have time to check it in payload 3. But its unlikely that there is still a need to overwrite the view in payload 3.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.