LexicalEditor doesn't show the panel inside the blocks type
Link to reproduction
No response
Payload Version
v3.0.0-beta.57 (2024-07-02)
Node Version
22.3.0
Next.js Version
15.rc
Describe the Bug
Can not show the panel of the lexical editor inside the field of blocks type
// build config
export default buildConfig({
admin: {
user: Users.slug,
},
// Define and configure your collections in this array
collections: [Media, Pages, Users],
typescript: {
outputFile: path.resolve(dirname, "payload-types.ts"),
},
// If you'd like to use Rich Text, pass your editor here
editor: lexicalEditor(),
// Your Payload secret - should be a complex and secure string, unguessable
secret: ENV.PAYLOAD_SECRET,
// Whichever database adapter you're using should go here
// Mongoose is shown as an example, but you can also use Postgres
db: mongooseAdapter({
url: ENV.PAYLOAD_DATABASE_URI,
}),
// If you want to resize images, crop, set focal point, etc.
// make sure to install it and pass it to the config.
// This is optional - if you don't need to do these things,
// you don't need it!
sharp,
plugins: [
// storage-adapter-placeholder
],
});
// collections
export const Pages: CollectionConfig = {
slug: "pages",
admin: {
// useAsTitle: "title",
},
fields: [
{
name: "title",
type: "richText",
required: true,
},
{
name: "components",
blocks: [Accordion],
type: "blocks",
required: true,
},
{ ...created },
{ ...modified },
],
versions: {
drafts: true,
},
};
// block
export const Accordion: Block = {
slug: "accordion",
fields: [
{
name: "heading",
type: "text",
},
{
name: "content",
type: "richText",
required: true,
editor: lexicalEditor(),
},
],
};
Reproduction Steps
https://github.com/payloadcms/payload/assets/30406982/684da979-c6a8-4062-8b2e-08837df8ca2a
Adapters and Plugins
No response
What do you mean with "panel"?
@AlessioGr sorry for missing a descriptive, I mean this
Not able to show this panel inside the block of the block types
I'm having a similar issue with Lexical
https://discord.com/channels/967097582721572934/1257686600788217856/1258073199611215982
Reproduced this. This happens only if any field in the chain is named components.
Fixed by https://github.com/payloadcms/payload/pull/7042
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.