0

I want to put data in lightning datatable by url link style like attached to express the record of relationship.

I tried header type "url", but it showed "http//" in the cells.

How can we put data by url style?

Thank you in advance.

enter image description here

0

1 Answer 1

0

I think you might have the column set up incorrectly. You want to use the fieldName attribute to hold the url. Then you want to use the `typeAttributes' to hold the text that the user sees.

To read up on type attributes and their supported types, see here

{
  label: "Account Name",
  fieldName: "TheVariableStoringTheLink",
  type: "url",
  sortable: false,
  typeAttributes: {
    label: {
      fieldName: "TheVariableWithTheLabel"
    },

    tooltip: "View the Course"
  }
}

Not the answer you're looking for? Browse other questions tagged .