forms: custom FormValueControl ignores updateOn ('blur' / 'submit') in reactive and template-driven forms
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- angular, typescript
调研方向
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 内容生成。
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
angular/angular 的其他 Issue
-
area: docs
难度 2/5 1-3 小时 新手友好度 76/100
-
area: forms forms: signals
难度 2/5 1-3 小时 新手友好度 78/100
-
area: docs gemini-triaged
难度 2/5 1-3 小时 新手友好度 70/100
-
area: forms forms: signals
难度 2/5 1-3 小时 新手友好度 68/100
-
area: docs area: forms
难度 2/5 1-3 小时 新手友好度 76/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 90/100
TanStack/tanstack.com#1293 ·