3.0.0-beta.32
Pre-release3.0.0-beta.32 (2024-05-14)
Features
- richtext-lexical: add rootFeatures prop to lexicalEditor (#6360) (c8a1cca)
- add missing server-only props to custom RSCs, improve req.user type, clean-up ui imports (#6355) (79f4907)
- consolidates admin.logoutRoute and admin.inactivityRoute into admin.routes (#6354) (6a0fffe)
Bug Fixes
BREAKING CHANGES
- add missing server-only props to custom RSCs, improve req.user type, clean-up ui imports (#6355) (79f4907)
Previously, we were only passing
payload
to RSCs. Now, we are passing the following props for component rendered outside buildComponentMap:
i18n
,locale
,params
,payload
,permissions
,searchParams
,user
And the following props for components rendered within buildComponentMap:
i18n
,payload
,Breaking:
if you use the following components in your own project, these now require aforementioned additional, server-only props, instead of just the
payload
prop:
Account
view- Default
Dashboard
viewDefaultTemplate
WithServerSideProps
RenderCustomComponent
(optional)Logo
Additionally, if you were using an HOC as a custom component, and the HOC passed props to the client component, you now have to filter out the additional server-only props we provide. You can use our withMergedProps
helper, which filters them automatically, >or mark your HOC with 'use client'
.
The
admin.logoutRoute
andadmin.inactivityRoute
properties have been consolidated into a singleadmin.routes
property. To migrate, simply move those two keys as follows:Old way:
// payload.config.ts { // ... admin: { logoutRoute: '/custom-logout', inactivityRoute: '/custom-inactivity' } }New way:
// payload.config.ts { // ... admin: { routes: { logout: '/custom-logout', inactivity: '/custom-inactivity' } } }
Contributors
- Alessio Gravili (@AlessioGr)
- Jacob Fletcher (@jacobsfletch)
- Jarrod Flesch (@JarrodMFlesch)