When DevTools are enabled, resetting form works only on the second time
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 670
- Fork
- 55
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-hook-form/devtools
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
react-hook-form/devtools#234 · 1 commento · 5 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
react-hook-form/devtools#226 · 3 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
react-hook-form/devtools#223 · 2 reazioni ·
-
DevTools in production Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
react-hook-form/devtools#212 · 5 commenti · 8 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
react-hook-form/devtools#208 · 13 commenti · 21 reazioni ·
Tutte le issue di react-hook-form/devtools
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·