Skip to content

Forms dictionaries #61975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2025
Merged

Conversation

alxhub
Copy link
Member

@alxhub alxhub commented Jun 9, 2025

No description provided.

alxhub added 4 commits June 9, 2025 10:58
Adjust the behavior and typing of forms when a model value is `undefined`.
In such cases, the form is not considered to have a field for that key of
the model, and navigation attempts should return `undefined`. The type
should also reflect the field's potential non-existence, as well as
correctly narrow the type when the field is non-null asserted.
`FieldNode`s were previously constructed with a static 'key', used for a few
purposes including `.value` operations (read/write). This meant that when a
`FieldNode` moved in an array via the tracking mechanism, it would be
resolved via the new path, but still write to the old path (a major bug).

This commit fixes the issue by introducing a proper reactive concept for the
field's current property key in the parent, which changes as the field moves
around.
… etc.

This commit should make the code much easier to follow by breaking apart
`FieldNode` into various pieces, each focused on a single concern.
@ngbot ngbot bot added this to the Backlog milestone Jun 9, 2025
@alxhub alxhub merged commit eb6c2ec into angular:prototype/signal-forms Jun 9, 2025
19 of 23 checks passed
@alxhub alxhub deleted the forms-dictionaries branch June 9, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant