Block field not using `label` in admin

default discord avatar
seth
10 months ago
1

I have a simple block field as follows:


const StreamTiered = {
  name: "streamTiered",
  label: "Stream",
  type: "blocks",
  blocks: [ButtonBlock, ImageBlock],
};

The field header is respecting the

label

but the "Add ..." button is not



Figured it out with some trial and error (docs hint at this but don't explain what actually goes in

labels

or what it affects but this did the trick:


const StreamTiered = {
  name: "streamTiered",
  label: "Stream",
  type: "blocks",
  admin: {
    description: "Add layout tiers and blocks"
  },
  labels: {
    singular: 'Block',
    plural: 'Blocks',
  },
  blocks: [ButtonBlock, ImageBlock],
};
    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.