Support async ErrorStateMatcher
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Please describe the feature you would like to request.
Currently, `ErrorStateMatcher` doesn't support return type `Promise` and `Observable`. Its return type is only `boolean`.
#### What is the use-case or motivation for this proposal?
I need to show `` when checked `input` is invalid after validation. This validation does need to call HTTP request(async). For example, when ID field in registration form is not unique, i should show `` because registration form doesn't allow to use the input's value as duplicated ID with other user. To provide this feature, `ErrorStateMatcher` has to support return type as `Promise` or `Observable`.
Beitragsleitfaden
Rechercherichtung
Beginne mit dem Lesen der ErrorStateMatcher API und des bestehenden mat-error-Validierungsablaufs und konzentriere dich darauf, wie die Gültigkeit der Eingabe geprüft wird. Vergleiche anschließend die angeforderten Promise- und Observable-Fälle und definiere den Abschluss so, dass Ergebnisse der asynchronen Validierung zuverlässig den entsprechenden mat-error-Zustand für doppelte IDs auslösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100