Support for composite forms
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### 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
コントリビューションガイド
調査の方向性
リンクされている StackBlitz の再現コードから始め、Submit をクリックしたときの composite form と inline の reactive form または template-driven form を比較します。Issue にリンクされている Angular Connect の原則を確認し、その後、Material controls がどのように親フォームを見つけ、blur または touch の状態を公開しているかを追跡します。再利用可能な composite form が control のエラーを表示し、touch の状態を一貫して伝播できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100