You need to sign in to do that
Don't have an account?
Sumesh Chandran
How to add Lightning:buttongroup as a column in lightning:datatable?
Just a newbie to salesforce development and Javascript as well. I got it done this way, it doesn't seem to show anything. Just taking it step by step
Thanks
({ fetchOpps : function(component, event, helper) { var actions = [ {label: 'Overdue', name: 'selectRecord'}, {label: 'Closed Won', name: 'closedWon'} ]; component.set('v.columns', [ {type: 'action', typeAttributes: {rowActions: actions}}, {type: "button", typeAttributes: { iconName: 'utility:add', label: '', name: 'selectRecord', title: 'selectRecord', disabled: false, value: 'test', }}, {type: "buttonGroup", typeAttributes: { iconName: 'action:approval', label: '', name: 'selectRecord', title: 'selectRecord', disabled: false, value: 'test', }}, {type: "button", typeAttributes: { iconName: 'action:approval', label: '', name: 'selectRecord', title: 'selectRecord', disabled: false, value: 'test', }}, {label: 'Opportunity name', fieldName: 'Name', type: 'text'}, {label: 'Close Date', fieldName: 'CloseDate', type: 'date'}, {label: 'Stage', fieldName: 'StageName', type: 'picklist'}, ]); helper.fetchOpportunities(component, event, helper); },Please advise!
Thanks
Hi Sumesh,
Greetings to you!
You're trying to use buttonGroup type for the column, which is not supported. You'll want to read the documentation (https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/documentation). The list of types supported are as follows:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks and Regards,
Khan Anas
All Answers
Hi Sumesh,
Greetings to you!
You're trying to use buttonGroup type for the column, which is not supported. You'll want to read the documentation (https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/documentation). The list of types supported are as follows:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks and Regards,
Khan Anas
The link you provided helped a lot.