SalesforceLabs / ActivityTimelineLWC

A LWC implementation of the Activity Timeline https://lightningdesignsystem.com/components/activity-timeline/#site-main-content
BSD 3-Clause "New" or "Revised" License
25 stars 21 forks source link

Any way to set the icon dynamically? #5

Open riekusr opened 8 months ago

riekusr commented 8 months ago

Hi, I want to have different icons for records coming out of the same object. Any way to support having a field hold the URL so i can do something like this:

image

Or any other way / workaround? I tried adding the object multiple times with different configurations and WHERE clauses but that unfortunately is also not supported.

riekusr commented 8 months ago

Alternatively support IMG AND HYPERLINK tags in the title field so I can format the icon myself:

image
rbklaassen commented 8 months ago

Hi @riekusr, to have different child implementations for the same object, you would need to use the apex dataprovider. You can for instance create 2 apex dataproviders for the same object, but use different filters / icons / fields to show. There is an example provider in this repo.

jvolkov commented 2 months ago

@rbklaassen Using the apex dataprovider on the task object to change icons seems to be overwritten by timelineItemTask.js