Form inputs do not display associated list of errors
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
- 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
- frontend
Hướng nghiên cứu
Tái hiện vấn đề trong CodeSandbox được liên kết, bắt đầu với src/dataProvider.tsx và hook useSubmit tùy chỉnh. Sau đó kiểm tra packages/ra-core/src/form/setSubmissionErrors.ts và thêm bài kiểm thử hồi quy được đề cập trong issue. Hoàn tất khi nhiều lỗi API cho một trường được hiển thị, bao gồm cả lỗi bằng tiếng Pháp và tiếng Anh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What you were expecting:
I would see two error texts below the input concerned by the error
What happened instead:
The input is actually red, showing there is an error, but not displaying the text provided by the API
Steps to reproduce:
- Go to this sandbox: https://codesandbox.io/s/broken-voice-dd8zth
- On the Tag page, try creating a tag (with french and english labels). Save.
- You should see the french error displaying correctly on the field while the english errors are not displaying
Related code:
Sanbox https://codesandbox.io/s/broken-voice-dd8zth?file=/src/dataProvider.tsx
I created a custom useSubmit hook whose purpose is to display errors associated to the fields concerned by the error
Other information:
From my investigation, the bug comes from the way setSubmissionErrors sets the error.
I'll try creating a merge request and adding a test to handle lists of errors associated to a field
Environment
- React-admin version: 4.4.3
- Last version that did not exhibit the issue (if applicable): N/A
- React version: 17
- Browser: Google Chrome: Version 106.0.5249.119 (Build officiel) (x86_64)
- Stack trace (in case of a JS error): N/A
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của marmelab/react-admin
-
Blank page after logout when the app re-renders `<Admin>` during `authProvider.logout()`Có thể đã có người làm @uchiha-suraj đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pagination: page button aria-labels are not translated on small screensCó thể đã có người làm @Singmin đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
marmelab/react-admin#11427 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add emptyText property to SelectArrayInputCó thể đã có người làm @kwitykwity đã nhận 61 ngày trước. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
marmelab/react-admin#10454 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 38/100
marmelab/react-admin#11426 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ra-data-graphql-simple: outdated graphql-ast-types-browser dependency causes npm peer warningsCó thể làm lại được @bipul724 đã nhận 14 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
marmelab/react-admin#11395 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của marmelab/react-admin
Issue tương tự
-
backend bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
geolens-io/geolens#3568 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs documentation good first issue priority:low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
rtk-ai/rtk#4900 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
API: `tsc.exe` opens a visible console window on Windows when the parent process has no consoleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/TypeScript#65083 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug p2 platform:web triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày