Skip to main content
Question

Swapping and configuring instances via setProperties result in weird results

  • October 7, 2023
  • 1 reply
  • 262 views

Andre_Cassal

I have a component which has different variant as well as boolean and text properties, when I set values via API using instance.setProperties and the object passed changes the variant of the instance

Code example

figma.currentPage.selection[0].setProperties({
    "Text#48:1": "$20.4",
    "Color": "Black",
    "hasSalesPrice": "True",
    "StrikeThrough Text#48:4": "$68"
})

the problem is that changing the variant and text properties at the same time doesn’t seem to be working.

any thoughts?

This topic has been closed for replies.

tank666

Do you see any errors in the console?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings