When DevTools are enabled, resetting form works only on the second time
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript
Línea de trabajo
Start with the linked CodeSandbox reproduction and compare the reset and watch behavior with and without React Hook Form DevTools enabled. Trace the reset button, the watched field, and the DevTools integration; done means the field and console log update on the first reset click in both configurations.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When DevTools are enabled, re-initializing fields by resetting them only work the second time.
I created a Code sandbox to reproduce the issue
Steps to reproduce
- Create a form with a field
- Add a console log with a
watchfor that field - Add a reset button that calls React Hook Form's
resetmethod - Test your page by filling in data for the field, and click on the reset button : you should see the console log with the reinitialized data for the field, and the field should be reinitialized
- Add DevTools to the page and click the reset button
Result
- The console log is shown only the second time the reset button is clicked
- The field is reset only the second second time the reset button is clicked
- Everything works fine if DevTools are not enabled
Expected result
- The console log should be shown with the reinitialized data
- The field should be reinitialized
- Lenguaje dominante
- TypeScript
- Estrellas
- 670
- Forks
- 55
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 react-hook-form/devtools
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
react-hook-form/devtools#234 · 1 comentario · 5 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
react-hook-form/devtools#226 · 3 reacciones ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
react-hook-form/devtools#223 · 2 reacciones ·
-
DevTools in production Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
react-hook-form/devtools#212 · 5 comentarios · 8 reacciones ·
-
issue: Warning: Cannot update a component (`DevTool`) while rendering a different component. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
react-hook-form/devtools#208 · 13 comentarios · 21 reacciones ·
Todos los issues de react-hook-form/devtools
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
copse-dev/agent-pane#2953 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·