[Key-Value Component] Using tag format + custom colors doesn't work with dynamic values

Hey, I found a similar problem with the new key-value component, related to tag colors.

on initial load, the tag color is not evaluated with the value, but with "undefined" but it does not change when the value changes. Only if I press "reset state" or change the code, it gets applied.

See here:

I'm posting here, because I suspect this is the same issue. I did not find a solution so far @Amelie , sorry :grimacing:

1 Like

I have a similar set of symptoms, I think originating from the same bug.

In my case, I'm conditionally setting colors on the values. My key values are rendering within a drawer, which loads data based on the currentSourceRow of another table. The first row I click on renders the colors as I'd expect. However, the second row I click on renders the same colors as the first. If I reset the state of the key value, it picks up the right colors.

See the sequence of events below.

First row click, launching the drawer and pulling in the data. Everything works as I'd expect.

Here's the same view, but for the second row of data. As you can see, the values have updated, but the colors have not.

When reset the state of the key value object, it shows as I'd expect.

Here's my Color configuration for one of the fields.

I thought I might be able to execute a script to work around this, but it doesn't seem I can reset the state of the key value outside of this option.

I found a workaround, but its a bit of a nuisance. I just created new labels and tag components for each key and value I needed to color map. The other caveat is that the spacing between the text and the tag is different than it is in the key value component. Not the end of the world, but it is different.

Here's an example

And proof of it working.
Screen Recording 2024-04-23 at 10.48.17 AM

@p0wl @mbaczynski I can reproduce this tags / color issue. Moving these to it's own forum topic to keep things separate. Submitting a bug report for this, and I'll update everyone as I get any additional information to share. Thanks!

1 Like