Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Signal form .reset() does not clear Angular Material error styling

オープン
#33,467 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
angular, typescript
領域
frontend

調査の方向性

リンクされている StackBlitz の再現から始め、signalForm().reset() と @angular/forms/signals および Angular Material mat-form-field の動作を比較します。reset が touched、dirty、バリデーションの状態をどのように更新するかを追跡します。完了の条件は、値がリセットされ、送信後に Material フィールドにエラースタイルが表示されなくなることです。

索引モデルが issue の本文から書いたものです。

説明

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

core, forms

Is this a regression?

No

Description

When using Angular Material form fields (mat-form-field) with signal-based forms (@angular/forms/signals), resetting the form after submission causes the Material input to display error styling (red outline) even though the field should no longer be in a touched or dirty state.

After calling signalForm().reset() on submit, the field value is correctly reset to an empty string. However, the Material form field renders as invalid with error styling applied. According to Angular Material's documented behavior, error styling should only be shown when the control has been touched. Since reset() is expected to clear both the touched and dirty states, the field should return to its pristine, untouched appearance — without any validation error indicators.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/github/mihai3636/2026--angular-signal-form-material-bug?file=src%2Fapp%2Fapp.ts

Please provide the exception or error you saw
N/A
Please provide the environment you discovered this bug in (run ng version)
Angular CLI       : 22.0.4
Angular           : 22.0.4
Node.js           : 26.1.0
Package Manager   : npm 11.13.0
Operating System  : win32 x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 22.0.4            │ ^22.0.0           │
│ @angular/cdk              │ 22.0.2            │ ^22.0.2           │
│ @angular/cli              │ 22.0.4            │ ^22.0.0           │
│ @angular/common           │ 22.0.4            │ ^22.0.0           │
│ @angular/compiler         │ 22.0.4            │ ^22.0.0           │
│ @angular/compiler-cli     │ 22.0.4            │ ^22.0.0           │
│ @angular/core             │ 22.0.4            │ ^22.0.0           │
│ @angular/forms            │ 22.0.4            │ ^22.0.0           │
│ @angular/material         │ 22.0.2            │ ^22.0.2           │
│ @angular/platform-browser │ 22.0.4            │ ^22.0.0           │
│ @angular/router           │ 22.0.4            │ ^22.0.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 6.0.3             │ ~6.0.2            │
│ vitest                    │ 4.1.9             │ ^4.0.8            │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?

No response

主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 1時間
マージ済み PR(30日)
84

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/components のほかの issue

angular/components の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。