SOLVED: Incorrect values when using component property on attributes

Hello Everyone,

I was playing with the beta version a little bit on one of our card design that has an intial number and then go us up to a number that is retrieved from the attribute data-target.

I’ve tried mapping this data-target attribute using a property for it inside the component and upon creating multiple instances with different property values, I found out they all render the same number in the front end.



Browser: Chrome 131.0.6778.140 (Official Build) (64-bit)
OS: Windows 11

Hello @khalid.ouhdane,

thank you for your repot. I was able to replicate a similar problem (the value in my case did not even show), but I could not replicate your issue.

Can I ask what is the setup of yours? Do you have a query loop on the component or anything else?

Thanks,
Matej

Hello @Matej , thanks for the reply.

No I didn’t do a query loop, just duplicated and filled the values manually. I don’t have anything special going on that would interfer with the rendering of the correct html value.

Does the property in your case have a default value? if it doesn’t that could be the reason it shows empty.

Hmm, I’ve tested same. Is the “98” in your case the default value of the property?
If not, to which card you set this value? Before or after duplicating?

Thanks.

Actually I just checked the deafult value in my case was 99, I taught it was 98, because they all still have 98 nomatter how many instances I created.

but when I disconected the property from the attribute, it was 98 there, which is the value I had there and I didn’t remove it, I just linked the property. so I guess that’s where 98 was coming from in my case.

When I removed the 98 and then linked the property, I get empty value just like you now.

1 Like

Yep, that’s it :bulb: Thank you for checking this out. This also explains why I got an empty attribute (because I didn’t have any value before), and why you got 98.

Thanks, I’ve added this info to the task.
Matej

Hi @khalid.ouhdane ,

We’ve fixed this in Bricks 1.12, now available as a one-click download from your dashboard.

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.12 Changelog – Bricks

Best regards,
Matej