-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Signal Forms - Form reset causes effect to rerun #65322
Copy link
Copy link
Closed
Description
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
No
Description
I have been experimenting with signal forms and have run into an issue. When I call form.reset() from within an effect, each time a form control changes in value, the effect is rerun causing the form to never be dirty. This can be avoided by wrapping form.reset() within untracked but I'd prefer not to do so as I would have to do this many times in a real application. Is this possibly an issue with the reset function?
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
No exception or errors occurring.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI : 21.0.0-rc.5
Angular : 21.0.0-rc.3
Node.js : 20.19.3
Package Manager : npm 10.8.2
Operating System : win32 x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/animations │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/build │ 21.0.0-rc.5 │ ^21.0.0-rc.5 │
│ @angular/cli │ 21.0.0-rc.5 │ 21.0.0-rc.5 │
│ @angular/common │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/compiler │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/compiler-cli │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/core │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/forms │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/platform-browser │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ @angular/router │ 21.0.0-rc.3 │ 21.0.0-rc.3 │
│ rxjs │ 7.8.2 │ ^7.8.1 │
│ typescript │ 5.9.3 │ ^5.8.2 │
│ zone.js │ 0.15.0 │ ~0.15.0 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Done