• Lucia Vega
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello

I want to display different icons in lightning:dataTable based on row condition.
For example
If row1.someField == 'A' then iconName = A
If row2.someField == 'B' then iconName = B

I have looked at documentation but it seems we can specify icons at the colmun level .

This is what I have done so far but it always display the same icon :
 
component.set('v.resultColumns', [
            		{label: 'Provenance', 						fieldName: 'provenance', 				 cellAttributes: { iconName: 'action:call' }}

                ]);