bug(form-field): Updating input value via `effect`+`FormControl` doesn't trigger label position calculation
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction dans src/example/form-field-overview-example.ts et suivez les étapes de StackBlitz en utilisant FormControl et effect avec la détection des changements OnPush. Suivez la mise à jour de la position du label de MatFormField et vérifiez que le label flotte après la modification de la valeur du contrôle, sans appeler manuellement ChangeDetectorRef.markForCheck().
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100