Skip to content

fix(forms): run metadata create lifecycle after node is fully constructed#67808

Merged
leonsenft merged 1 commit intoangular:mainfrom
alxhub:sf/field-init
Mar 24, 2026
Merged

fix(forms): run metadata create lifecycle after node is fully constructed#67808
leonsenft merged 1 commit intoangular:mainfrom
alxhub:sf/field-init

Conversation

@alxhub
Copy link
Member

@alxhub alxhub commented Mar 23, 2026

Updates MetadataKey.create() to accept FieldState as the first argument, and moves its execution from the FieldMetadataState constructor to a runMetadataCreateLifecycle() method called at the end of the FieldNode constructor. This ensures the FieldNode is fully constructed before any metadata create operations run.

Fixes #67769

@pullapprove pullapprove bot requested review from atscott and thePunderWoman March 23, 2026 20:03
@ngbot ngbot bot added this to the Backlog milestone Mar 23, 2026
@alxhub alxhub added target: major This PR is targeted for the next major release forms: signals labels Mar 23, 2026
…ndefined

This improves compatibility with TypeScript's exactOptionalPropertyTypes.

Fixes angular#67246
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of suggestions

reviewed-for: fw-general, public-api

@alxhub alxhub added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Mar 23, 2026
@alxhub
Copy link
Member Author

alxhub commented Mar 23, 2026

Caretaker: presubmit is "green"

@leonsenft leonsenft removed the request for review from atscott March 24, 2026 21:50
@leonsenft leonsenft merged commit ee8d209 into angular:main Mar 24, 2026
21 of 23 checks passed
@leonsenft
Copy link
Contributor

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

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: forms forms: signals merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Signal froms: Custom form schema metadata behaviour

3 participants