You need to sign in to do that
Don't have an account?
shalini sharma 24
Displaying image formula field in lightning data table
Hi
i have created a lightning datatable and in that i have a column that displays text formula field. But the table shows html instead of image. Any solution for this??
Thanks
i have created a lightning datatable and in that i have a column that displays text formula field. But the table shows html instead of image. Any solution for this??
Thanks
Tiago Armando Coelho (22 days ago): lightning:datatable support image data type
https://success.salesforce.com/ideaView?id=0873A000000lKqxQAE
Tiago participates in this forum. He could have more interesting details.
That seems impossible currently.
I didn't try by myself.
In datatable i want to display the image in one column. I dont want to show the link. I want to show image associated with the link.Please help me out
You can not directly display image in data table for now, but I found a solution which worked for me.
I had a formula field which I was willing to show on data table which was something like:
and so the image was not displayed so I changed it to:
and then you declare your column similar to whats shown below (providing a fieldname to be used in the js controller/helper to set the iconName):
and in the Style component you can give URL to your image like:
Output is as follows:
Thank you
Oshin Agrawal, big thanks to you, you're a life lifesaver.
I had a problem that my image repeated a lot of times, so i had to change you're code a little bit: