React hook form + DevTool + reset causes from to not register fields correctly

オープン
#173 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
devtools, frontend

調査の方向性

Open the linked StackBlitz and inspect package.json and App.jsx. Reproduce the async reset with react-hook-form 7.34.2, then compare the behavior when DevTool is removed and when the version is downgraded to 7.15. Done means identifying whether DevTool or react-hook-form causes the fields and values to display correctly after reset.

索引モデルが issue の本文から書いたものです。

説明

Version Number

7.34.2

Codesandbox/Expo snack

https://stackblitz.com/edit/react-hook-form-set-form-values-in-useeffect-m65nbe?file=package.json,App.jsx

Steps to reproduce
  1. Go to the sandbox
  2. Form doesn't get filled in with initial values

It works if devtools is removed from the component. It also works if form version is downgraded to 7.15.

It used to work fine on version 7.15. I didn't try other versions to find out which one broke it. I'm also not sure if it's a bug on @hookform/devtools or on react-hook-form.

Expected behaviour

Form gets reset to async values and fields register correctly. Dev tools display fields with values.

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要言語
TypeScript
スター
670
フォーク
55
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-hook-form/devtools のほかの issue

react-hook-form/devtools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。