I checked all previous post relating this Warning. I also tried to figure it out to some extent. Here’s what I learned about when the warning appears:
- “Change to” from 1 variant to another is set
- the “Change to” is placed within Conditional if statement
- the interaction was copy&pasted to another element (still within the same variant of the same component or another variant but from the same component)
- the component with the “Change to” action is nested within another component
Just by recreating the action manually without copy&paste removes the warning.
Even after clearing the warning my intended actions don’t work the way they supposed to.
From what I can tell - if variables are used with variable modes and each component instance has the proper variable mode set (by inheritance or directly) AND action depends on condition checking some of these variables, the scope of variables is ALWAYS the FIRST mode on conditional check BUT CORRECT (however it is set up) on the actual elements (eg. text values etc.).
The tested scenario works as following:
- component A contains 4 instances of the component B
- each instance of component B has set different variable mode (from 1 to 4)
- within component B there’s component C with 2 buttons with conditional “change to” variant based on comparison between 2 variables
- “change to” toggles component C variant from one to another and back
- between 2 buttons in component C there’s text displaying the very same value that decides on the “change to” condition
- the text displayed is always CORRECT and DIFFERENT for EACH variable MODE
- the change action ONLY works as intended for the first instance of component B that has variable mode set to 1
- the conditions on other instances where variable MODE is different than 1 (first) seem dependent on the values from MODE 1 (eg. I click the button within component C in 1st instance of component B and then it allows me to change the variant of component C in 2nd instance of component B, but not before).
My conclusion is that the variable mode setting/scoping is not evaluated at condition level but only on the components/elements.