form-field(select): with matNativeControl and outline where one field relies upon the value of another
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### Reproduction
Open StackBlitz, and try to select different options, open dev tools and see errors: https://angular-jjb9g7.stackblitz.io
Steps to reproduce:
1. Add two `mat-form-field` with `appearance="outline"`
2. Add `` to each one
3. Make that second field select dynamically get options after first field value changed
#### Expected Behavior
First field changes value and second field get new options
#### Actual Behavior
First field changes value and second field get new options and errors at console are shown:
```ts
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
Previous value: 'mat-form-field-should-float: false'.
Current value: 'mat-form-field-should-float: true'.
```
#### P.S. If delete appearance="outline", no errors are shown.
#### Environment
- Angular: 7.2.0
- Material: 7.3.7 and 8.2.3
- Browser(Chrome Version 74.0.3729.108 (Official Build) (64-bit)):
- Operating System (Ubuntu 18.04):
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et inspectez les deux éléments mat-form-field avec contour qui utilisent matNativeControl. Reproduisez la mise à jour du select dépendant tout en surveillant la console pour détecter ExpressionChangedAfterItHasBeenCheckedError. C’est terminé lorsque le deuxième champ se met à jour après la modification du premier sans l’erreur signalée, tout en conservant l’apparence outline.
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é
- Plutôt claire
- Accessibilité débutants
- 45/100