Setting a single formControl to Untouched does not reset the error css state
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### 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?
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit der verknüpften StackBlitz-Reproduktion und verfolgen Sie, wie sich markAsUntouched auf den Fehlerzustand des Material-Formularfelds im Vergleich zu den nativen form-control-Klassen von Angular auswirkt. Bestätigen Sie das Verhalten anhand eines einfachen Formulars und überprüfen Sie anschließend, dass das Markieren eines Steuerelements als untouched die entsprechende ungültige Darstellung entfernt, ohne andere Steuerelemente zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 38/100