Setting a single formControl to Untouched does not reset the error css state
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
Don't use mat-form-field-invalid, but use the native angular core css classes ng-invalid
Because mat-form-field-invalid does not get removed when setting a single formControl to untouched
#### What is the current behavior?
mat-form-field-invalid does not get removed when doing markAsUntouched
#### What are the steps to reproduce?
Providing a StackBlitz reproduction is the *best* way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
On every simple form
#### What is the use-case or motivation for changing an existing behavior?
Material uses it's own mat-form-field-invalid css class instead of the angular core css classes, this makes error. This is a wrong design
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
newest versions
#### Is there anything else we should know?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et suivez l'effet de markAsUntouched sur l'état d'erreur du champ de formulaire Material par rapport aux classes natives de form-control d'Angular. Confirmez le comportement sur un formulaire simple, puis vérifiez que le fait de marquer un contrôle comme untouched supprime le style d'invalidité correspondant sans modifier les autres contrôles.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 38/100