# Why different instances of my component react the same way on different params?

**URL:** <https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 19, 2023, 10:01am UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201 "2023-06-19T10:01:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMA\_nylon](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@AMA\_nylon](https://forum.inductiveautomation.com/u/AMA_nylon)\
**Post date:** [June 19, 2023, 10:01am UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/1 "2023-06-19T10:01:23Z")

</div>

Hi there,  
I have a component (I was provided with, I didn't create) called Vanne-vert. When I create two instances of it in a view and try to change the color of one of them through some params, they react the same way. As if they were binded to each others. I can't get a hold of what happening in here.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/6/567aeb4c338f052271a992eb6f0acc6d8fd91caa.png)  
Here is the component :  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f374fc8f3e407566a78cfb86d304b8358d5c2a66.png)  
And here is the binding for the coloring :  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/a/8a913e6135f42e79e85a2d03289ae296b4ee9b40.png)

I might be missing something. I hope you can help me.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [June 19, 2023, 10:56am UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/2 "2023-06-19T10:56:07Z")

</div>

this is bugg.  
idk if it has been fixed yet if you arent on the lateest patch, try updating if possible since there has been some svg changes not that long ago

else you'll have to change the id for each view

> [@\[BUG-6988\]Embedded View "Template" Instance Behavior](https://forum.inductiveautomation.com/t/bug-6988-embedded-view-template-instance-behavior/68170/13):
>
> To get an SVG to work in the current version, you need to not have duplicate svgs where their definition contains any reference to a hard-coded id and your goal is to change their color. Any svg which contains color definitons inside of the svg in a manner like this: style="fill: url("#s0\_3-SVGID\_1\_");" will result in this issue because they're defining their appearance (fill, in this case) based off of a specific id present in the DOM. When they search for that id, they will always find the fi…

---

<div class="post-metadata">

**Author:** ![AMA\_nylon](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@AMA\_nylon](https://forum.inductiveautomation.com/u/AMA_nylon)\
**Post date:** [June 19, 2023, 11:10am UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/3 "2023-06-19T11:10:32Z")

</div>

What id exactly if I may ask ?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [June 19, 2023, 11:21am UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/4 "2023-06-19T11:21:31Z")

</div>

no idea i just remeber seeing this somewhere before  
try adding domId in the metadata

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 19, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/5 "2023-06-19T14:35:12Z")

</div>

> [@AMA\_nylon](#):
>
> What id exactly if I may ask ?

It's the HTML `id` attribute used to define the color to be used in areas of the svg. It is not directly exposed in the property structure of the Perspective component. Use of the `domId` property will not provide any sort of workaround.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [June 19, 2023, 2:50pm UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/6 "2023-06-19T14:50:15Z")

</div>

so its not been solved yet?☹

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 19, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/why-different-instances-of-my-component-react-the-same-way-on-different-params/75201/7 "2023-06-19T15:26:57Z")

</div>

It has been solved and a [fix is in 8.1.26](https://inductiveautomation.com/downloads/releasenotes/8.1.26#:~:text=Drawings%20Components%20containing%20gradients).
