You need to sign in to do that
Don't have an account?
Sumesh Chandran
Lightning datatable - Have 3 columns with buttons
Hello all,
I am looking to have buttons change color, depending on the value received from the server. I have a stage column from the Opportunity object, I want the buttons on each column change their color based on the current stage.
For example, WON - OVERDUE - CLOSED LOST - CLOSED WON, would be the 4 button columns with fixed titles, depending on the value from the server the buttons should change their colour to green. If the stage is at Overdue the WON & OVERDUE Column button should chnage their background color to green. How to do this?
I was able to put a button the Lightning Datatable with the values from the server.
Please advise
I am looking to have buttons change color, depending on the value received from the server. I have a stage column from the Opportunity object, I want the buttons on each column change their color based on the current stage.
For example, WON - OVERDUE - CLOSED LOST - CLOSED WON, would be the 4 button columns with fixed titles, depending on the value from the server the buttons should change their colour to green. If the stage is at Overdue the WON & OVERDUE Column button should chnage their background color to green. How to do this?
I was able to put a button the Lightning Datatable with the values from the server.
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' }}, {type: 'button',typeAttributes: { label: {fieldName: 'StageName'}, name: 'editRecord', title: 'editTitle', disabled: false, value: 'test', }},
Please advise
--
Magulan Duraipandian
www.infallibletechie.com