fix(richtext-lexical): various issues for lexical sub-fields due to incorrectly generated client field schema map (#10276)
Fixes https://github.com/payloadcms/payload/issues/9905, https://github.com/payloadcms/payload/issues/9660 Single lexical fields were represented file in the schema map (`path => field`). In the client schema map however, they were incorrectly represented like this: `path => { fields: [field] } `
This commit is contained in:
@@ -481,6 +481,28 @@ export const seed = async (_payload: Payload) => {
|
||||
await _payload.create({
|
||||
collection: 'LexicalInBlock',
|
||||
data: {
|
||||
content: {
|
||||
root: {
|
||||
children: [
|
||||
{
|
||||
format: '',
|
||||
type: 'block',
|
||||
version: 2,
|
||||
fields: {
|
||||
id: '6773773284be8978db7a498d',
|
||||
lexicalInBlock: textToLexicalJSON({ text: 'text' }),
|
||||
blockName: '',
|
||||
blockType: 'blockInLexical',
|
||||
},
|
||||
},
|
||||
],
|
||||
direction: null,
|
||||
format: '',
|
||||
indent: 0,
|
||||
type: 'root',
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
blocks: [
|
||||
{
|
||||
blockType: 'lexicalInBlock2',
|
||||
|
||||
Reference in New Issue
Block a user