fix(richtext-slate): link and upload extra field drawers did not render fields if collection has unrelated access control set (#10583)
Fixes https://github.com/payloadcms/payload/issues/9695
This commit is contained in:
@@ -69,7 +69,7 @@ export const LinkButton: React.FC<{
|
||||
const { t } = useTranslation()
|
||||
const editor = useSlate()
|
||||
const { getFormState } = useServerFunctions()
|
||||
const { collectionSlug, docPermissions, getDocPreferences, globalSlug } = useDocumentInfo()
|
||||
const { collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()
|
||||
|
||||
const { closeModal, openModal } = useModal()
|
||||
const drawerSlug = useDrawerSlug('rich-text-link')
|
||||
@@ -98,7 +98,9 @@ export const LinkButton: React.FC<{
|
||||
const { state } = await getFormState({
|
||||
collectionSlug,
|
||||
data,
|
||||
docPermissions,
|
||||
docPermissions: {
|
||||
fields: true,
|
||||
},
|
||||
docPreferences: await getDocPreferences(),
|
||||
globalSlug,
|
||||
operation: 'update',
|
||||
|
||||
Reference in New Issue
Block a user