I am trying to emulate the below view in LWC. The description value "Click here for Email Template" should only be hyperlink not the entire value, the value is passed from the apex class. Can anyone help me out how to reach this requirement in LWC.

enter image description here

  • Did you try this? Where are you stuck? Can you show the code you tried? Commented Sep 11, 2019 at 13:04
  • {const columns = [ {label: 'Time', fieldName: 'activityDateTime', type: 'date', typeAttributes: {day: 'numeric', month: 'short', year: 'numeric', hour: '2-digit', minute: '2-digit', hour12: true}, initialWidth: 175}, {label: 'Event Type', fieldName: 'event_type', type: 'text', initialWidth: 175}, {label: 'Description', fieldName: 'url', type: 'url', typeAttributes: {label: {fieldName: 'description'}, target: '_blank'}} ];} This makes the entire value hyperlink however I am looking only a part of it to be hyperlinked. Commented Sep 11, 2019 at 13:19

1 Answer 1


You can create a custom component and add it to the datatable via custom data type. You will also have to create a component to extend the datatable. This answer helps outline that How to use custom LWC lightning component in lightning-datatable

Creating Custom Data Types https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation

You must log in to answer this question.

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