angular / angular/components

Pagination controls for mat-tab-group do not appear when used with the mat-sidenav

Đang mở
#19,562 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/sidenav area: material/tabs P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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)})
}
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với ứng dụng kiểm thử được cung cấp sử dụng mat-sidenav và mat-tab-group, tái hiện thay đổi bố cục bằng cách bật tắt sidenav quanh ngưỡng phân trang của tab. Theo dõi cách nhóm tab phản hồi với không gian ngang bị thu hẹp và được khôi phục; hoàn tất khi các điều khiển phân trang của nhóm xuất hiện và biến mất chính xác khi sidenav được mở và đóng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.