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
Formatting with Data Types
link is missing in the documentation. Where did you find the doc about the url type?value
attribute: developer.salesforce.com/docs/atlas.en-us.lightning.meta/…{label: 'Client Name' , fieldName: 'link' , type: 'url' ,initialWidth : 350 , typeAttributes: { label: { fieldName: 'Name' }, value: { fieldName: 'link' } }},