KeyValue (new) component click on multiple tags not being indexed

The current key value (new) component has a slight issue when trying to handle click events on a value that is a list of tags

e.g.
given data: {"myTags": ["a", "b", "c"]}
with the property of "myTags" set to "tags"
and with a click event handler to copy to clipboard the value {{ item[i] }} it just copies the first element of the tags list

the items alias is the list (correct expected behavior)
but the i alias is always set to 0 when handling the click event

Or maybe the i is from a parent component? not really sure how the aliases are propagated to the child components (it is just a key value that is a child of a container)

2 Likes

Hi @william.cho, thanks for flagging this! I've gone ahead and created a feature request for fixing this bug.

This issue is also applied to the tags in a table component.
Hope this issue gets resolved any time soon. :blush:

1 Like

Could you share more about your use case for the table?

I'm trying to click on a tag and use its value to do a query.

Is there a way to do this? I've been mucking around with this for a few hours and can't figure out how to get the index of the clicked tag in a set.

Hi @veteze,

Thank you for your +1! We still have an outstanding feature request to support this. I will follow up here if our team is able to prioritize the request

1 Like

I figured out a way to do this with Markdown instead.

1 Like