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.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI 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"
}
}