Support for composite forms
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la riproduzione collegata di StackBlitz e confronta i moduli compositi e quelli inline reattivi o basati su template quando si fa clic su Submit. Esamina i principi di Angular Connect collegati nell’issue, quindi traccia il modo in cui i controlli Material trovano il loro modulo padre ed espongono lo stato di blur o touch. Il lavoro è completato quando i moduli compositi riutilizzabili mostrano gli errori dei controlli e propagano lo stato di touch in modo coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100