Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
viewActions are not easily accessible in custom views.
Why?
We extract view actions when we call getViewFromConfig, but never pass them to the custom views.
How?
Properly types return type for serverProps inside getViewFromConfig and adds viewActions to serverProps so they are spread into props when we build the custom view components.
Now custom server views will get the viewActions as a prop.
What?
viewActions
are not easily accessible in custom views.Why?
We extract view actions when we call
getViewFromConfig
, but never pass them to the custom views.How?
Properly types return type for serverProps inside
getViewFromConfig
and adds viewActions to serverProps so they are spread into props when we build the custom view components.Now custom server views will get the viewActions as a prop.
Fixes #9338