angular / angular/components

Setting a single formControl to Untouched does not reset the error css state

Aperta
#14,289 8 commenti 1 reazione 0 assegnatari Vedi su GitHub
area: material/form-field P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### 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?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione collegata in StackBlitz e traccia in che modo markAsUntouched influisce sullo stato di errore del campo del modulo Material rispetto alle classi native di form-control di Angular. Conferma il comportamento su un modulo semplice, quindi verifica che contrassegnare un controllo come untouched rimuova lo stile di invalidità corrispondente senza modificare gli altri controlli.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.