Skip to main content
Question

Swapping and configuring instances via setProperties result in weird results

  • October 7, 2023
  • 1 reply
  • 271 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.

1 reply

tank666
  • October 8, 2023

Do you see any errors in the console?