How do you set an action on a column to Navigate to Sobject record?
Or when the name of the record is clicked fire an action.
Doesn't appear you can do it with the base component.
<lightning:card title="Entities">
<lightning:datatable data="{!v.Contact}"
columns="{!v.mycolumns}"
keyField="Id"
/>
({
init : function(component, event, helper) {
component.set('v.mycolumns', [
{label: 'ID', fieldName: 'Id', type: 'Id'},
{label: 'Full Name', fieldName: 'Name', type: 'text'},
{label: 'First Name', fieldName: 'FirstName', type: 'text'},
{label: 'Last Name', fieldName: 'LastName', type: 'text'},
{label: 'Phone, Primary', fieldName: 'Phone', type: 'phone'},
{label: 'Phone, Secondary', fieldName: 'Phone_Secondary__c', type: 'phone'},
{label: 'Email', fieldName: 'Email', type: 'Email'},
{label: 'Business Fax', fieldName: 'Fax', type: 'phone'},
{label: 'Street', fieldName: 'MailingStreet', type: 'text'},
{label: 'City', fieldName: 'MailingCity', type: 'text'},
{label: 'State', fieldName: 'MailingState', type: 'text'},
{label: 'Zip', fieldName: 'MailingPostalCode', type: 'number'},
]);
helper.getData(component);
},