#Nested RichText Field inside Block without Label or description

7 messages · Page 1 of 1 (latest)

west hatch
#

I have a block field for a quiz in which I'm using the RichText fields for the question and possible answer option respectively.

What doesn't see,m to work, however, is that the Label and/or description is shown in the Admin UI.

import { Block } from 'payload'
import { lexicalEditor } from '@payloadcms/richtext-lexical'

export const Quiz: Block = {
  slug: 'quiz',
  fields: [
    {
      name: 'question',
      label: 'Question',
      type: 'richText',
      required: true,
      editor: lexicalEditor(),
      admin: {
        description: 'The question that the user will be asked'
      }
    },
    {
      name: 'options',
      type: 'array',
      fields: [
        {
          name: 'option',
          label: 'Option',
          type: 'richText',
          required: true,
          editor: lexicalEditor(),
          admin: {
            description: 'A possible answer to the question'
          }
        },
        {
          name: 'explanation',
          type: 'richText',
          required: true,
          editor: lexicalEditor(),
          admin: {
            description: 'Explanation for the answer'
          }
        },
        {
          name: 'isCorrect',
          label: 'Correct',
          type: 'checkbox',
          defaultValue: false,
          admin: {
            description: 'Is this the correct answer?'
          }
        },
      ],
      maxRows: 4
    }
  ]
}

Does this supposed to work or am I missusing it somehow?

kindred grove
#

We have fixed this in 3.6.0

west hatch
#

Thank you very much for your fast reply and the swift fixing. 👏

west hatch
#

@kindred grove I've updated Payload to 3.6.0 but the error seems to still persist.

kindred grove
#

Hmhm in this case, could you open a GitHub issue with a reproduction? Will investigate!

west hatch