Pagination controls for mat-tab-group do not appear when used with the mat-sidenav
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
I am trying to use the mat-sidenav with the mat-tab-group and there appears to be an issue with the pagination controls for the mat-tab-group. The test app will create 3 default tabs. If you add enough tabs so that there is just enough space to show the tabs without the tab pagination controls being displayed (based on your screen width), then open the sidenav by clicking the Toggle Sidenav button, the pagination controls do not appear in the tab control. Clicking the Add Tab button to add one more tab will force the tab control to reevaluate the horizontal space and then display the pagination controls for the tab control.
It appears that that the tab control is not aware that the horizontal space has decreased, because the sidenav is open, and does not show the pagination controls. The opposite is also true that if the pagination controls are displayed when the sidenav is open, when the sidenav is closed and there is enough horizontal space that the tab control no longer needs the pagination controls they do not disappear.
The desired behavior would be that the tab control will display or not display its pagination controls when necessary as the sidenav is open and closed.
```
Sidenav
Toggle Sidenav
Add Tab
Tab content for {{tab.label}}
```
```
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
tabs: any[] = [{label: "tab1"}, {label: "tab2"}, {label: "tab3"}]
addTab() {
this.tabs.push({label: "tab" + (this.tabs.length + 1)})
}
}
```
コントリビューションガイド
調査の方向性
mat-sidenav と mat-tab-group を使用する提供済みのテストアプリから始め、タブのページネーションのしきい値付近で sidenav を切り替えてレイアウトの変更を再現します。水平方向のスペースが縮小および復元されたときにタブグループがどのように応答するかを追跡します。sidenav を開閉したときに、ページネーションコントロールが正しく表示および非表示になることが完了条件です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100