angular / angular/components

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

オープン
#26,271 コメント 2 件 リアクション 8 件 担当者 0 名 GitHub で見る
area: material/form-field P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現から始め、特に src/app/app.component.html と、参照されている angular.json、src/styles.scss、src/app/app.module.ts、src/index.html の各ファイルを確認します。初期状態で非表示になっている mat-tab 内に、mat-icon matPrefix を持つ outline の mat-form-field を再現し、その後 Angular Material の form-field と tab の動作を追跡します。タブを切り替えた後にラベルとテキストが正しく揃えば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。