Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

forms: custom FormValueControl ignores updateOn ('blur' / 'submit') in reactive and template-driven forms

未关闭
#70,734 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
angular, typescript
领域
frontend, testing

调研方向

Start in Angular's forms package and reproduce the behavior using the linked minimal reproduction. Trace how FormValueControl and FormCheckboxControl connect to Reactive Forms and Template-Driven Forms, then add focused coverage for updateOn set to 'blur' and 'submit'. Done means custom controls defer FormControl or ngModel updates until the configured event, matching legacy ControlValueAccessor behavior.

由索引模型根据 Issue 内容生成。

描述

area: forms gemini-triaged
Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

No

Description

Custom components implementing Signal Forms FormValueControl<T> (or FormCheckboxControl) without a legacy ControlValueAccessor ignore the updateOn configuration ('blur' or 'submit') when bound to Reactive Forms ([formControl], formControlName) or Template-Driven Forms ([(ngModel)] with [ngModelOptions]).
Instead of deferring the update until blur (touch output) or form submission, the bound FormControl or ngModel updates immediately on every keystroke/emission from the custom control's model() signal.

This breaks a migration path to FormValueControl since it means that switching the implementation of the custom control can break the usage. The assumption in the docs is therefore wrong.

Please provide a link to a minimal reproduction of the bug

https://github.com/sbarfurth/signal-control-update-on

Please provide the exception or error you saw

Please provide the environment you discovered this bug in (run ng version)
Angular CLI       : 22.1.8
Angular           : 22.1.6
Node.js           : 24.19.0
Package Manager   : npm 11.17.0
Operating System  : linux x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 22.1.8            │ ^22.1.8           │
│ @angular/cli              │ 22.1.8            │ ^22.1.8           │
│ @angular/common           │ 22.1.6            │ ^22.1.0           │
│ @angular/compiler         │ 22.1.6            │ ^22.1.0           │
│ @angular/compiler-cli     │ 22.1.6            │ ^22.1.0           │
│ @angular/core             │ 22.1.6            │ ^22.1.0           │
│ @angular/forms            │ 22.1.6            │ ^22.1.0           │
│ @angular/platform-browser │ 22.1.6            │ ^22.1.0           │
│ @angular/router           │ 22.1.6            │ ^22.1.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 6.0.3             │ ~6.0.2            │
│ vitest                    │ 4.1.11            │ ^4.0.8            │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?

No response

主要语言
TypeScript
星标
101k
派生
28.1k
平均合并
2 天 6 小时
30 天内合并 PR
307

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/angular 的其他 Issue

查看 angular/angular 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。