feat(mat-tab): ability to set mat-tab height to grow to fill available area within mat-tab-group
- 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ả
### Feature Description
Currently, the best solution I've found is to override:
`::ng-deep .mat-mdc-tab-body-wrapper { flex-grow: 1; }`
See this [reproduction](https://stackblitz.com/edit/1kawpj?file=src%2Fexample%2Ftab-group-basic-example.html,src%2Fexample%2Ftab-group-basic-example.scss).
If `flex-grow: 1` was added to the body wrapper or an API option provided that allowed that behaviour without using `::ng-deep`, that would be great. Thanks.
### Use Case
Situations where I want a tab group to occupy the full height available and have its contents expand to the available height. E.g. a table or text editing component inside a tab that is scrollable but should occupy as much of the height available as possible.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết, đặc biệt là src/example/tab-group-basic-example.html và src/example/tab-group-basic-example.scss, rồi kiểm tra cách mat-tab-group bố trí body của nó. So sánh workaround ::ng-deep flex-grow hiện có với hành vi được yêu cầu; được xem là hoàn tất khi một nhóm tab có thể lấp đầy chiều cao khả dụng và nội dung của nó có thể mở rộng mà không cần override đó.
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
- Tính năng
- Độ 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
- 48/100