Signal Forms coerce null to numeric value on text inputs ( <input type="text"> ) in v22 · Issue #69757 · angular/angular · GitHub
Skip to content

Signal Forms coerce null to numeric value on text inputs ( <input type="text"> ) in v22 #69757

Description

@xMikee

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

Yes

Description

When using Signal Forms in Angular v22 with a standard text input (e.g., ), if the model's value is
programmatically set to null (or receives null as an initial/updated value), the form control incorrectly treats/coerces this value
as a numeric type instead of remaining null or an empty string.
This is a regression, as the exact same implementation worked correctly and preserved the expected text/null type in Angular v21. This
is particularly noticeable on typed string fields or generic text fields where passing null unexpectedly alters the
value type.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-dv7tq7dq

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI       : 22.0.0
Angular           : 22.0.0
Node.js           : 26.0.0
Package Manager   : npm 11.12.1
Operating System  : darwin arm64

┌───────────────────────────────────┬───────────────────┬───────────────────┐
│ Package                           │ Installed Version │ Requested Version │
├───────────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/architect         │ 0.2200.0          │ ^0.2200.0         │
│ @angular-devkit/core              │ 22.0.0            │ ^22.0.0           │
│ @angular/build                    │ 22.0.0            │ ^22.0.0           │
│ @angular/cdk                      │ 21.2.8            │ ^21.2.8           │
│ @angular/cli                      │ 22.0.0            │ ^22.0.0           │
│ @angular/common                   │ 22.0.0            │ ^22.0.0           │
│ @angular/compiler                 │ 22.0.0            │ ^22.0.0           │
│ @angular/compiler-cli             │ 22.0.0            │ ^22.0.0           │
│ @angular/core                     │ 22.0.0            │ ^22.0.0           │
│ @angular/forms                    │ 22.0.0            │ ^22.0.0           │
│ @angular/platform-browser         │ 22.0.0            │ ^22.0.0           │
│ @angular/platform-browser-dynamic │ 22.0.0            │ ^22.0.0           │
│ @angular/router                   │ 22.0.0            │ ^22.0.0           │
│ ng-packagr                        │ 22.0.0            │ ^22.0.0           │
│ rxjs                              │ 7.8.2             │ ~7.8.0            │
│ typescript                        │ 6.0.3             │ ~6.0.3            │
│ vitest                            │ 4.1.5             │ ^4.0.8            │
└───────────────────────────────────┴───────────────────┴───────────────────┘

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions