angular / angular/components

bug(mat-form-field): mat-form-field appearance outline with mat-icon as matPrefix inside a mat-tab

Ouverte
#26,271 2 commentaires 8 réactions 0 personnes assignées Voir sur GitHub
area: material/form-field P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### Is this a regression?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

13

### Description

If we have a `` containing a `` inside a `` that is not displayed initially, the label isn't positioned correctly.

### Reproduction

Steps to reproduce:

https://stackblitz.com/edit/angular-ivy-svduwe?file=src%2Fapp%2Fapp.component.html,angular.json,src%2Fstyles.scss,src%2Fapp%2Fapp.module.ts,src%2Findex.html

```




search
Outline form field







search
Outline form field



```

### Expected Behavior

The text should be aligned correctly after the icon

### Actual Behavior

![image](https://user-images.githubusercontent.com/25467653/207881998-8d73d9a7-147c-46b6-95cc-99fd76acd432.png)

### Environment

- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Chrome/Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows. MacOS

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée, en particulier src/app/app.component.html et les fichiers référencés angular.json, src/styles.scss, src/app/app.module.ts et src/index.html. Reproduisez le mat-form-field de type outline avec un mat-icon matPrefix dans le mat-tab initialement masqué, puis analysez le comportement de Angular Material concernant le form-field et le tab ; le travail est terminé lorsque le label et le texte sont correctement alignés après avoir changé d’onglet.

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
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.