Currently when I use the lightning:datatable and then a column of type url.
I cant seem to bind a actual event to the url..
My Code is currently as follows
Component
<lightning:layoutItem size="12" >
<lightning:datatable data="{! v.data }" title="{!v.title}"
columns="{! v.columns }"
keyField="{!v.keyField}"
minColumnWidth="{!v.minColumnWidth}"
hideCheckboxColumn="{v.hideCheckboxColumn}"
resizeColumnDisabled="true"
/>
</lightning:layoutItem>
Columns
var columns = [
// { type: 'action', typeAttributes: { rowActions: actions } },
{label: 'Client Name'
, fieldName: 'link'
, type: 'url'
, typeAttributes: {
label: {
fieldName: 'Name'
}
}}
] ;
component.set("v.columns" , columns ) ;
Rendering this out then doesnt seem to take any affect on the href
and only seems to affect the title attribute ..
Then in the docs can only see these two attributes available for a url
url
Displays a URL using lightning:formattedUrl
label, target
Any help is greatly appreciated
Best Answer
This seems to be working for me, my href correctly compiles to a salesforce id (with full regular non-lightning domain):
Name_Link__c
is: