Skip to content

fix(material/form-field): update view when the control is swapped out - #33636

Merged
crisbeto merged 1 commit into
angular:mainfrom
lazerg:fix/issue-33628-form-field-control-swap-cd
Aug 5, 2026
Merged

fix(material/form-field): update view when the control is swapped out#33636
crisbeto merged 1 commit into
angular:mainfrom
lazerg:fix/issue-33628-form-field-control-swap-cd

Conversation

@lazerg

@lazerg lazerg commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

When the projected form field control is swapped out, for example inside an @if, the form field picks up the new control but never marks its own view for checking. The host bindings stay correct because they're evaluated in the parent view, while template bindings like mdc-text-field--disabled keep showing the previous control's state until something else triggers change detection.

Fixes #33628.

@lazerg
lazerg force-pushed the fix/issue-33628-form-field-control-swap-cd branch from e4ca8da to f5cb521 Compare August 5, 2026 11:00
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Aug 5, 2026
@crisbeto
crisbeto merged commit e9760b3 into angular:main Aug 5, 2026
15 of 17 checks passed
@crisbeto

crisbeto commented Aug 5, 2026

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto pushed a commit that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: material/form-field target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(MatFormField): mdc-text-field--disabled class not applied

2 participants