Support for composite forms
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### 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
Guía de contribución
Línea de trabajo
Empieza con la reproducción enlazada de StackBlitz y compara los formularios compuestos y los formularios inline reactivos o basados en plantillas cuando se hace clic en Submit. Revisa los principios de Angular Connect enlazados en el issue y, después, sigue el proceso mediante el que los controles de material encuentran su formulario padre y exponen el estado de blur o touch. El trabajo está terminado cuando los formularios compuestos reutilizables muestran los errores de los controles y propagan el estado de touch de forma coherente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100