Input's FormControl setValue does not work when mat-form-field has chip-list and input is linked to autocomplete
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
Input's FormControl's setValue should work for an input that is inside a mat-form-field that has both autocomplete and chip-list.
#### What is the current behavior?
FormControl setValue does not work when the following iff a mat-form-field has an input that has matAutocomplete AND the mat-form-field has a mat-chip-list.
SetValue works if one removes the matAutocomplete directive from the input or removes the mat-chip-list element.
#### What are the steps to reproduce?
Demo should have the input incrementing a number every second, which doesn't work:
https://stackblitz.com/edit/angular-ay3yts?file=app%2Fautocomplete-simple-example.html
Deleting mat-chip-list or removing the matAutocomplete directive fixes the issue.
#### What is the use-case or motivation for changing an existing behavior?
I want to be able to programmatically add a chip then clear the input when an option in the autocomplete has been selected.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 5.2.4
Material: 5.2.4
#### Is there anything else we should know?
Nope :)
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz, especialmente con app/autocomplete-simple-example.html, y ejecuta el ejemplo con matAutocomplete y mat-chip-list presentes. Rastrea por qué setValue del FormControl de input no se actualiza en esa combinación. Se considera completado cuando las actualizaciones programáticas funcionan y el comportamiento de autocomplete y chip-list sigue estando disponible.
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
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100