Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Array title/label?

default discord avatar
bensler2 years ago
2

Hello, I am new to payload and trying to figure everything out. In this picture i have created an array. Is there a way to give them the name from the title, instead of them being called "info 01", "info2" and instead be "Test1" like my title, and then "Test2"?

  • default discord avatar
    megetron_2 years ago

    as far as i can recall, in the mongodb document you have a blockName which you can set to modify the name per each

  • default discord avatar
    bensler2 years ago

    Thanks for your answer. I solved it differently with this code though:



    admin: {
      components: {
        RowLabel: ({ data }) => {
          return data?.title
        },
      },
    },
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.