0

Trying to create a dynamic tooltip for my Lightning Datatable URL so using field names (well singular fieldname at the moment) instead of text but was wondering if there is any way to include multiple fieldnames? or i guess make the text dynamic but that seems less feasible

I've tried

{ fieldNames: ['amount', 'contact'] }

{ fieldNames: 'amount' & 'contact' }

{ fieldName: 'amount', fieldName: 'contact' } Any ideas on syntax to make the tooltip include multiple field names

here is my current typeattribute code with a singular fieldname in tooltip

typeAttributes: {

label: { 
   fieldName: actualLabel 
},

tooltip: { 
   fieldName: 'primarysoffer'
}

}
  • If you want to create a string from several field names - create the string before you insert it to the typeAttribute: var multiFieldNames = 'firstfield' + ' secondfield'; then set the tooltip to this var. – Itai Shmida Mar 3 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.