-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/form-fieldformsThis issue is related to Angular Forms integrationThis issue is related to Angular Forms integration
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:
- Update input via
FormControl+effect - Observe that label position does not update unless
ChangeDetectorRef.markForCheck()is invoked explicitly.
Expected Behavior
Using signals and effects, 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
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/form-fieldformsThis issue is related to Angular Forms integrationThis issue is related to Angular Forms integration