bug(mat-chip-grid): mat-chip-grid marks FormControl as dirty on blur without actual value changes
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
When using mat-chip-grid bound to a FormControl, the control is marked as dirty when the user focuses on the input field and then blurs away, even when no chips are added or removed and the value remains unchanged.
### Reproduction
StackBlitz link: [https://stackblitz.com/edit/2za91ztq?file=src%2Fexample%2Fchips-form-control-example.html](https://stackblitz.com/edit/2za91ztq?file=src%2Fexample%2Fchips-form-control-example.html)
Steps to reproduce:
1. Click into the input field
2. Click away (blur) without typing anything or adding any chips
3. Check the FormControl's dirty state - it will be true even though no value changes occurred
### Expected Behavior
The FormControl should only become dirty when the actual value changes (chips added/removed), not merely from focus/blur interaction.
### Actual Behavior
The FormControl becomes dirty after focus/blur interaction even when no chips are added or removed and the value remains unchanged.
### Environment
- Angular: 20.1.0
- CDK/Material: 20.1.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Mac
Guía de contribución
Línea de trabajo
Empieza ejecutando la reproducción enlazada de StackBlitz, especialmente src/example/chips-form-control-example.html, y confirma que FormControl pasa a estar dirty después del focus y el blur sin que cambie el valor. Sigue el manejo del blur y de los cambios de valor de mat-chip-grid y verifica después que el estado dirty solo cambie cuando se añadan o eliminen chips.
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
- Bastante claro
- Aptitud para principiantes
- 45/100