6.4.0 beta2: Objects as Values in Parameters do not work anymore

It seems objects as values in parameters does not work anymore.

If I try the example from the docs: https://theme.co/docs/parameters#using-objects-as-values-in-parameters
I still have the [object Object] bug. But now if I click the arrow nothing happens anymore and I cannot select any value.

I think it always has done that unfortunately and I wrote the docs before discovering that. When you initially set it up it probably registers as okay. To solve I think we’ll need to add a key property to the options array objects so we can properly link a value to an array. It would also solve the issue if you happen to change the default object value. Components and parameters issues is something I’d like to take a look at sometime this week again.

There is is a different behaviour between 6.3.9 and 6.4. In 6.3.9 the arrow button worked (maybe not as intended), but after clicking the arrow button I was able to choose a value again.
But in 6.4. the arrow button does nothing at all and I am not able to choose a value. So currently this update would break some of my sites, at least some of my customers cannot change some settings.

I think something like a key field would be a solution. I think the value of key should be the value that is set on the choose field (for the inital default value). The docs are not clear enough, if I should use the value or the label for the choose field. So it seems we need a key field, even when not using objects.

Furthermore, if you are taking a look at parameters, could you please check if everything works with isVar: true? In 6.3.9 objects as parameters did not work with isVar: true, I was not able to make changes for breakpoints.

1 Like

From our notes I think the back button broke somewhere along the way of 6.3. I’m going to try a fix in the next beta, but in general it needs work with some of the idea I shared with the key. isVar isn’t going to work with objects from what I can. It’s outputting a css variable, but not outputting individual key values. I can add a request for this. Have a great day!

Thank you @charlie for having a look. If needed, I can give you logins to several 6.3.9 installs where the back button and objects are working.

Very cool @charlie. Working much better now with 6.4b3 as far as I can tell.

Did something change on how to set the initial value?
It seems when the component is pulled on the stage, the default value is not set.
But after using the back arrow everything is fine, and stays fine – no [object Object] seen so far.
Or do we need a key value now for the the initial setting?

1 Like

I think your experiencing a bug where when you first create a parameter it would display [object object]. After you saved and reloaded you were fine after that right? I will have a fix for the initial parameter creation issue, thanks for bringing this up.

I have not setup the key part, ideally it works with a key or just an initial object.

Yes, right. Very nice, thanks for fixing!

1 Like