issue: useForm with values parameter doesn't work with hook Devtools

Đang mở
#203 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
devtools, frontend

Hướng nghiên cứu

Start with the linked CodeSandbox reproduction and compare the form behavior with and without the hook DevTools enabled. Verify the useForm values parameter after the API query completes; done means the returned values populate the inputs while DevTools remains enabled.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Version Number

7.47.0

Codesandbox/Expo snack

https://codesandbox.io/p/sandbox/heuristic-babycat-cv9mhj?embed=1&file=%2Fsrc%2Findex.jsx%3A19%2C4

Steps to reproduce
  1. Go to the CodeSandBox link
  2. Notice the values don't get populated when the API is returned
  3. But if you comment out hook forms DevTool then the input will be populated with the correct API return value
Expected behaviour

Values parameter from useForm should update the form values once the query has been completed.

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
Ngôn ngữ chính
TypeScript
Star
670
Fork
55
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react-hook-form/devtools

Tất cả issue của react-hook-form/devtools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.