Async initial array values are not set when form.Field is conditionally rendered
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Comienza con la reproducción mínima en el proyecto de StackBlitz, especialmente en src/index.tsx, y compara el comportamiento entre las versiones afectadas 1.32.0/1.33.0 y 1.31.0. Reproduce el estado de carga condicional y verifica que el array resuelto de forma asíncrona aparezca cuando se renderiza form.Field, sin requerir que se añada otra persona.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Until version 1.31.0, it's been possible to set async initial values that are in the form of an array, where the form.Field that displays the array is conditionally rendered. In version 1.33.0, this does not seem to work anymore (it was broken from version 1.32.0). This bug is pretty similar to the issue I reported a couple of weeks ago, where the difference is that I now conditionally render the form.Field that displays the array. The use case for this, is showing a loading UI while the async data is fetched. It was concluded in my previous issue that it was a regression from https://github.com/TanStack/form/pull/2172, so I assume the same goes for this new issue.
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-form-ehnyffpx?file=src%2Findex.tsx
Steps to reproduce
- Open the StackBlitz
- Notice that no person is displayed after 3 seconds, when the async state is updated and the loading UI disappears
- You may click the "Add person"-button to notice that there suddenly is 2 people in the list
Expected behavior
I would expect the form.Field to render the array when the async data is resolved and the form.Field is displayed.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
TanStack Form adapter
react-form
TanStack Form version
1.33.0 (from 1.32.0)
TypeScript version
6.0.3
Additional context
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.7k
- Forks
- 689
- Merge medio
- 2 d 11 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/form
-
Dificultad 2/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area: runtime scope: devtools type: bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
area: runtime scope: core type: bug v1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TanStack/form#2337 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
FormApi: onSubmit/onServer error cleared on any non-matching validation cause, not just 'change'Abiertov1 v2: needs investigation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
v1 v2: needs investigation
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TanStack/form#2294 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/form
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Doist/todoist-cli#576 ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug supabase/cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CopilotKit/aimock#491 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
agilepathway/label-checker#710 · 2 comentarios ·
Los mantenedores suelen responder en 1 día