Skip to content
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

fix(next): thread default ServerProps to view actions and other components that were missing #9868

Conversation

akhrarovsaid
Copy link
Contributor

What?

This PR threads default serverProps to Edit & List view action slots.

Why?

To be more in-line with how the docs specify custom components should work. Custom components should recieve, at minimum, the BasePayload instance and i18n object.

How?

By including props into RenderServerComponent call in the DefaultTemplate

Notes:

  • There is an opportunity for a refactor here to reuse these props throughout multiple places in DefaultTemplate. Slightly awkward due to having the actions being memoized but doable. Happy to make the necessary changes for this.

@jacobsfletch jacobsfletch enabled auto-merge (squash) December 11, 2024 16:33
@jacobsfletch jacobsfletch changed the title fix(next): thread default serverprops to edit and list view action slots fix(next): thread default ServerProps to view actions and other components that were missing Dec 11, 2024
@akhrarovsaid
Copy link
Contributor Author

Thanks @jacobsfletch & @AlessioGr for the review and additions! Appreciate it!

@jacobsfletch
Copy link
Member

@AlessioGr is going to add include a few more components to this which were also missing server props.

@jacobsfletch jacobsfletch enabled auto-merge (squash) December 11, 2024 16:42
@jacobsfletch jacobsfletch merged commit 0303b78 into payloadcms:main Dec 11, 2024
54 checks passed
Copy link
Contributor

🚀 This is included in version v3.6.0

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

Successfully merging this pull request may close these issues.

3 participants