angular / angular/components

bug(RadioButton): Radio button group adds scroll when used in MatTab component

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

説明

### Is this a regression?

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

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

_No response_

### Description

When the `mat-radio-group` component is placed inside the `mat-tab` component it adds unnecessary scroll when any other content doesn't

But can be fixed by using `mat-tab-group dynamicHeight`

### Reproduction

StackBlitz link: [Link](https://stackblitz.com/edit/d9acy1?file=src%2Fexample%2Ftab-group-animations-example.html)
Steps to reproduce:
1. Use `mat-tab-group` and `mat-tab`
2. Use `mat-radion-group` and `mat-radio-button` and place inside the `mat-tab`
3. Notice scroll bar
4. Add `dynamicHeight` attribute to the `mat-tab-group`
5. Notice the scroll bar is gone

### Expected Behavior

The scroll bar should not appear when mat-radio-group is placed inside the mat-tab

### Actual Behavior

mat-radio-button-group adds scroll when used in mat-tab component

### Environment

- Angular: "@angular/core": "^17.3.0",
- CDK/Material: "@angular/material": "18.0.0",
- Browser(s): Chrome
- Operating System: macOS

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

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

調査の方向性

mat-tab-group、mat-tab、mat-radio-group、mat-radio-buttonを使用したリンク先のStackBlitz再現コードから始め、まずdynamicHeightなしで、次にdynamicHeightありで確認します。タブとラジオのレイアウト動作を追跡し、その後、報告された組み合わせを対象とするリグレッションテストを追加します。dynamicHeightを必要とせずに不要なスクロールバーが表示されなくなれば完了です。

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

評価

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

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

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