How to map appTagets in breadcrumbs

When I setup the breadcrumbs component with mapped data source, how can I map the app targets? The appTargetsByIndex is always ["", "", ..., ""]

What I really need is when one of the breadcrumbs is clicked, I want to know which one is clicked and act accordingly.

William Tsui

Hello @Will_Tsui!

I just replicated the component with a mapped value and also saw that my 'appTargetsByIndex' is also empty strings in an array. Very odd.

Will report this to our eng team to find out if I am trying to use it incorrectly. I was hoping to find an on click event handler but there doesn't seem to be one built in.

However, after searching breadcrumbs in the docs I found a potential alternative solution to your use case, check it out here as it involves the Stepped Container Component to navigate forward and backward through an app on clicks. Let me know if that works!

Hi Jack,

Thanks for looking into this, hope to hear from the eng team soon.

I understand the alternative solution but not very applicable to my usage. I am showing a path through a tree structure (root node > 2nd level node > 3rd level node > ... > leaf node) as breadcrumbs and want to make it able to jump back to any previous nodes. As for now, my workaround with onClick is to limit it to go back only the previous level.

Hi Will,

Glad you were able to find a workaround with onClick.

The breadcrumb component is fairly new so your feedback/use case will help our engineers refine it down. Will have updates when any changes are made!

To give more background on the usage of appTargetsByIndex this field will only populate when the Breadcrumb component has Content:Manual then in the 'Edit Breadcrumb' modal with the Type set to App, as shown below.

So you would need to "hard code" more or less the node levels, but this could work to access app pages and their URLs for navigation purposes. Let me know if that could be an alternative!