You need to sign in to do that
Don't have an account?
Sumesh Chandran
Lightning: Datatable - Button column with title from the server!
Hello,
I am trying to add a button column to a lightning datatable with each button in that column to have the value from the serverCall. I got to this point, but it doesn't display the value. New to Saleforce & Javascript.
I am trying to add a button column to a lightning datatable with each button in that column to have the value from the serverCall. I got to this point, but it doesn't display the value. New to Saleforce & Javascript.
<lightning:datatable keyField="id" data="{! v.opps }" columns="{! v.columns }" hideCheckboxColumn="true" onrowaction="{! c.handleRowAction }"/>
component.set('v.columns', [ {label: 'Opportunity name', fieldName: 'Name', type: 'text'}, {label: 'Close Date', fieldName: 'CloseDate', type: 'date', editable: 'true', cellAttributes: { iconName: 'utility:event', iconAlternativeText: 'Close Date' }}, {label: 'Action', fieldName: 'StageName', type: 'button', typeAttributes: { iconName: 'utility:view', label: 'View Record', fieldName: 'StageName', name: 'viewRecord', disabled: false, value: 'viewBtn', variant:{fieldName: 'StageName'}}} ]);
Sorry for this issue you are facing.
May I suggest you please refer to below link from the forums community exactly with a similar discussion which will help you resolve the above issue.
- https://developer.salesforce.com/forums/?id=9060G0000005a5IQAQ
Hope this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
All Answers
Sorry for this issue you are facing.
May I suggest you please refer to below link from the forums community exactly with a similar discussion which will help you resolve the above issue.
- https://developer.salesforce.com/forums/?id=9060G0000005a5IQAQ
Hope this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
https://newstechnologystuff.com/2019/01/01/lightning-datatable-lazy-loading-with-inline-editing-and-actions/