MatInput does not clear error state on form reset
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
**This is my submiting function**
public submitCategoryForm(): void {
this.buttonText = 'Processing...';
this.isClicked = true;
const categoryData = this.categoryForm.value;
this.categoryModel = new CategoryInputModel(
categoryData['title'],
categoryData['imageUrl']
);
this.categoryServices.addNewCategory(this.categoryModel).subscribe(() => {
this.buttonText = 'Add';
this.isClicked = false;
this.categoryForm.reset({ title: '', imageUrl: '' });
});
}
#### What is the use-case or motivation for changing an existing behavior?
After submiting my form (successfully) and reset values of the form, validations for required value pop up. How i can submit my form clear values and to make sure validations are not shown.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6, Material 6.4.7
#### Is there anything else we should know?
コントリビューションガイド
調査の方向性
エントリーポイント submitCategoryForm からの動作、特に categoryForm.reset({ title: '', imageUrl: '' }) の呼び出しを、利用可能であれば報告されている Angular 6 および Material 6.4.7 のバージョンを使用して再現します。reset によって必須フィールドのエラーが非表示のままになるべきかを判断し、その後、リセット後に期待される状態が検証されるよう、関連するフォーム/input テストを追加または更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100