angular / angular/components

Support for composite forms

Đang mở
#10,508 9 bình luận 3 reaction 0 người được giao Xem trên GitHub
area: material/form-field P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### feature request: Support for composite forms

#### What is the expected behavior?
Allow building of composite forms using material components.

#### What is the current behavior?
The controls won't pick up the correct parent form when in a composite form so their errors won't be shown according to the error state matcher. There are also no hooks for listening for blur on controls like select so we can propagate the touch event.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-3vwszx
In the above stackbliz, is an example using just 2 inputs for first name, last name. In my use case there would be more than just 2 inputs but it demonstrates the issue. On the composite form when submit is clicked, the error messages are not shown. On the inline form when submit is clicked, the error messages correctly display.

#### What is the use-case or motivation for changing an existing behavior?
Being able to group many different controls under one composite control so it can be easily reused inside of a reactive or template driven form.

#### Is there anything else we should know?
Using the principles explained in the angular connect talk here https://www.youtube.com/watch?v=CD_t3m2WMM8&feature=youtu.be&t=1645

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

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và so sánh các biểu mẫu composite với các biểu mẫu inline reactive hoặc template-driven khi nhấp vào Submit. Xem lại các nguyên tắc Angular Connect được liên kết trong issue, sau đó lần theo cách các material controls tìm biểu mẫu cha của chúng và cung cấp trạng thái blur hoặc touch. Hoàn thành khi các biểu mẫu composite có thể tái sử dụng hiển thị lỗi của control và truyền trạng thái touch một cách nhất quán.

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

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

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.