bug(mat-chip): mat-chip does not react to [selected] binding when the mat-chip-list also contains a formControl (e.g.) official autocomplete example
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Reproduction
This example is copied directly from the official "Chips Autocomplete" example ([https://material.angular.io/components/chips/examples]). I have just stripped some of the unnecessary bits for a minimal example.
The example shows 3 copies of same mat-chip-list showing how mat-chips do not react to [selected] binding when a mat-input with either [formControl] or [matAutocomplete] bindings are included in the mat-chip-list.
All the existing chips should be selected in all copies. The only difference between the 3 is what bindings are included in the
https://components-issue-y2hda6.stackblitz.io
Steps to reproduce:
1. Create a mat-chip-list with mat-chips that have a [selected] binding (or just static flag set)
2. Add a with either [matAutocomplete] or [formControl]
3. The mat-chips no longer reflect their "selected" css styles (although appear to be internally in selected state)
#### Expected Behavior
For all chips to be selected in all copies
#### Actual Behavior
Presence of [formControl] or [matAutocomplete] prevents css styles being applied to selected chips
#### Environment
- Angular: 11.1.1
- All OS/Browser
Guía de contribución
Línea de trabajo
Comienza con la reproducción de StackBlitz enlazada y compárala con el ejemplo oficial de Chips Autocomplete. Inspecciona el comportamiento de mat-chip-list y mat-chip cuando la entrada usa [formControl] o [matAutocomplete]. Se considera completado cuando los chips existentes aplican sus estilos CSS de seleccionados en los tres casos reproducidos.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 35/100