fix(richtext-lexical): field.admin overrides were ignored in RenderLexical helper (#14024)

We forgot to spread field.admin, thus you were not able to override this
when using `RenderLexical`.
This commit is contained in:
Alessio Gravili
2025-10-01 16:39:44 -07:00
committed by GitHub
parent a938ad6289
commit 810da546b6

View File

@@ -52,6 +52,8 @@ export const RenderLexical: React.FC<
...((field as RichTextField) || {}),
type: 'richText',
admin: {
...((field as RichTextField)?.admin || {}),
// When using "fake" anchor fields, hidden is often set to true. We need to override that here to ensure the field is rendered.
hidden: false,
},
},