I have a lightning:dataTable control in a lightning component I'm developing. I have a column in that dataTable of type 'button'.
I want to be able to hide the button in that column, based upon the value of another column in that row.
Is there a way I can do this, while still using lighting:dataTable? By way of example:
Component
<lightning:dataTable
columns="{! v.gridColumns }"
data="{! v.gridData }"
keyField="Document"
hideCheckboxColumn = "true"
aura:id="myTree"/>
Controller
onInit: function (component, event, helper) {
var columns = [];
columns.push({type: 'button', label: 'Button Column', fieldName: 'detailPage', typeAttributes: {name: 'show_details', label: 'My Page'}});
columns.push({type: 'text', fieldName: 'DocumentCategory', label: 'Document Category'});
component.set('v.gridColumns', columns);
}