Closed nrenard closed 1 month ago
Hi @nrenard! Thanks for raising this, this should be fixed in the next release.
What happens here is basically that we convert boolean-like strings like "Yes" and "No" to "true" and "false", which is only intended for figma.boolean
, but is currently the case for figma.enum
too.
*edit: removed the suggested workaround - we're changing enums in the next release to not normalize values, meaning you will need to put the literal values instead
I'm trying to map data from a variant using an figma.enum:
The variant has Yes, No and Indeterminate, in the list.
This is the code that i'm doing:
And the result is that when the variant is No we receive
false
, when is Indeterminate we receiveindeterminated
, but when the variant is equal to true we receive nothing... As it is false or something like that.Should the figma.enum return true in the yes as mapped?
Note: When i ran the create command in this component the auto generate file comes with a figma.boolean in this variant.