$w.HiddenMixin api bug

I am using wix code to assign value to a variable based on conditional logic relating to whether certain vector images are hidden or not.

The hidden property of the vector images does not appear to be returned correctly. Rather than returning the current hidden property (when a button is clicked, which triggers the code) the hidden property as of the time the page was loaded is being returned.

Is wix able to investigate to see whether this is being caused by a bug in the $w.HiddenMixin api?

thanks

john

Hi John,

could you provide minimal reproducible case for us to investigate? Code sample or website URL would be helpful as well.

The website url is https://www.giadaskincare.com/quiz-1

The issue is with the code associated with the “add to cart” button on the third slide. Selection of radio buttons on the prior slides result in vector images being hidden or not. The hidden property of the vector images is then used to determine the product options for a product to be added to the cart. However, the hidden property of the vector images does not appear to be returned as expected.

Thanks

John,

the issue is reproducible on your site, so we will definitely investigate. In the mean time I would suggest adding intermediary state variable instead on relying on components’ “visible” and “hidden” properties. For example, your questionnaire results could be written to an object:

const result = {
  vitaminA: true,
  vitaminB: false,
  ...
}

You could then use this object to update the UI - hiding and showing appropriate vector images, as well as use it to populate cart.