Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`TextInput` component not handling events during the initial life cycles

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

Maintainer thường phản hồi trong vòng 1 ngày

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
35/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
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện react-admin-delayed-sync được liên kết và so sánh hành vi của nó với react-hook-form 7.44.3 và 7.50.1. Theo dõi quá trình khởi tạo và xử lý sự kiện của TextInput được thể hiện trong bản tái hiện, sau đó xác minh rằng thao tác gõ bằng Cypress vẫn giữ lại ký tự đầu tiên trong tên người dùng, trong khi mật khẩu vẫn chính xác.

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

Mô tả

needs more info

Some bit of context

We use react-admin version 4.16.9 in a pnpm monorepo workspace. And we have the automatic renovate pull requests to update our repository packages.
Our end to end tests were successful before updating to react-hook-form from 7.44.3 to 7.51.0 then it started to fail consistently. The failing test was related to react-admin's logging in page.

Test is as follows (in this order):
  • Cypress finds the username and password fields.
  • Cypress starts typing in the corresponding credentials.

Assume the credentials are:

  • username: a-user
  • password: what-a-password

What you were expecting:
It was expected to fill in the username and password fields normally. But we noticed that the test was failing because the typed in username was -user (notice the missing a) but the password field was normal what-a-password.

What happened instead:
It was expected of course that the username and password to have a-user and what-a-password respectively.

Steps to reproduce:

You can check the reproduction code here react-admin-delayed-sync.

If you change react-hook-form to 7.44.3 then you will see the sync works as expected

Version 7.44.3

https://github.com/marmelab/react-admin/assets/29442110/9d568ab7-78d8-4035-9ae0-30105327c714

Version 7.50.1

https://github.com/marmelab/react-admin/assets/29442110/034ad9a0-8300-4d86-b81e-ab16013b9746

Thus, we can notice that the issue is with the TextInput component not from the registered input component with react-hook-form.

Related code:

You can check the sandbox that I have created for this react-admin-delayed-sync.

Environment

  • React-admin version: ^4.16.10
  • React version: 18.2.0
  • React Hook Form version: 7.50.1
  • Browser: Chrome
Ngôn ngữ chính
TypeScript
Star
27k
Fork
5.5k
Merge trung bình
1 ngày 3 phút
Pull request đã merge (30 ngày)
32

Chuẩn bị môi trường

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 marmelab/react-admin

Tất cả issue của marmelab/react-admin

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.