bug(form-field): Updating input value via `effect`+`FormControl` doesn't trigger label position calculation
- 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 updating a `FormControl` value inside a signal `effect`, the `MatFormField` floating label does not reposition under `OnPush` change detection unless `ChangeDetectorRef.markForCheck()` is called manually.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/ujogbvgu?file=src%2Fexample%2Fform-field-overview-example.ts
Steps to reproduce:
1. Update input via `FormControl` + `effect`
2. Observe that label position does not update unless `ChangeDetectorRef.markForCheck()` is invoked explicitly.
### Expected Behavior
Using `signal`s and `effect`s, I expected not to have to call `ChangeDetectorRef.markForCheck()` for the label to float.
### Actual Behavior
The label did not float when the control's value was set.
### Environment
- Angular: 20.2.x
- CDK/Material: 20.2.x
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Guía de contribución
Línea de trabajo
Comienza con la reproducción en src/example/form-field-overview-example.ts y sigue los pasos de StackBlitz usando FormControl y effect con la detección de cambios OnPush. Rastrea la actualización de la posición de la etiqueta de MatFormField y verifica que la etiqueta flote después de que cambie el valor del control, sin llamar manualmente a ChangeDetectorRef.markForCheck().
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
- 38/100