nestedProps wont live update

Abierto
#319 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
43/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
figma, typescript
Área
tooling

Línea de trabajo

Start with the figma.nestedProps mapping shown in the issue and compare it with the other form component where the same setup works. Reproduce the toggle with the provided example, then trace how nested properties are read and updated. Done means toggling the nested disabled value updates the rendered component; the issue names no test or source file to start from.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

API question

I have a set of form components made up of nested instances. I am trying to use nestedProps so we can toggle the different properties on and off. If I have it render the value from the property, it will use whatever the default setting is on the first render in the code example, but if you try to toggle any values, it does nothing.

Anything outside the nestedProps, e.g. validation property, works fine.

What is interesting to note is that it works fine on another form component with the same setup, which makes me think it's just a bug.

Version: 1.3.5
OS: Mac

I have tried a few things that didn't help

  • confirmed labels all match
  • Tested in both the Desktop App and Web interface.
  • changed the name of the layer to remove the dot in the middle
  • tried exposing the properties.
  • Tried setting up a code connect file for the formElement.labelGroup specifically
  • unpublished and republished in case it got into a bad state
  • I unpublished left for a couple of days, cleared my local cache republish same issue.

Am I missing something really obvious here? Could it have gotten into a bad state and i need to reset or something?

Example code:

figma.connect(RadioGroup, figmaUrl, {
    props: {
        labelDisabledProps: figma.nestedProps("formElement.labelGroup", {
            disabled: figma.boolean("isDisabled", {
                true: "true",
                false: undefined,
            }),
        }),
    },
    example: ({ labelDisabledProps }) => (
        <RadioGroup disabled={labelDisabledProps.disabled} label="label" value="value" onChange={() => {}}>
            <RadioButton value="value1" label="label1" name="radio-group" />
        </RadioGroupNew>
    ),
});

Screenshot from Figma

Image
Lenguaje dominante
TypeScript
Estrellas
1.6k
Forks
126
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de figma/code-connect

Todos los issues de figma/code-connect

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.