angular / angular/components

form-field(select): with matNativeControl and outline where one field relies upon the value of another

Aperta
#16,229 1 commento 3 reazioni 0 assegnatari Vedi su GitHub
area: material/form-field area: material/select P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### 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):

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione StackBlitz collegata e ispeziona i due elementi mat-form-field con contorno che usano matNativeControl. Riproduci l’aggiornamento del select dipendente osservando la console per rilevare ExpressionChangedAfterItHasBeenCheckedError. Il lavoro è completato quando il secondo campo si aggiorna dopo la modifica del primo senza l’errore segnalato, mantenendo l’aspetto outline.

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
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.