[SalesForce] Hyperlinking in Lightning:Datatable

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 ..

enter image description here

enter image description here

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):

  {
    label: "SKU",
    fieldName: "Name_Link__c",
    type: "url",
    typeAttributes: {
      label: { fieldName: "Name" }
    },
    initialWidth: 100
  },

Name_Link__c is:

LEFT($Api.Partner_Server_URL_260, FIND( '/services', $Api.Partner_Server_URL_260))+Id
Related Topic