MatStepper navigation tiggers form validation when it's not touched
- 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?
Form validation is triggered only if fields are touched.
#### What is the current behavior?
When navigating though a material stepper, the form validation is triggered even if the fields are not touched.
#### What are the steps to reproduce?
https://stackblitz.com/angular/nanlqdlandy
1. Submit first step, you will arrive to step 2
2. Go back to step 1
3. Go back to step 2
#### What is the use-case or motivation for changing an existing behavior?
I think it's pretty confusing for the user to show an error even if he/she didn't even start to touch the field.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
See stackblitz.
Beitragsleitfaden
Rechercherichtung
Beginne mit der verlinkten StackBlitz-Reproduktion und folge der Navigationssequenz von MatStepper: Sende Schritt 1 ab, kehre zu ihm zurück und navigiere dann erneut zu Schritt 2. Vergleiche das Validierungsverhalten für nicht berührte Felder mit dem erwarteten Verhalten. Betrachte das Issue als abgeschlossen, wenn die Navigation keine Validierungsfehler für Felder anzeigt, die weiterhin nicht berührt wurden.
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
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100