angular / angular/components

[cdk-virtual-scroll-viewport][mat-table] - sticky headers is not working properly when combining mat-table with cdk-virtual-scroll-viewport

Đang mở
#18,240 3 bình luận 9 reaction 0 người được giao Xem trên GitHub
area: cdk/scrolling 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ả

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
https://stackblitz.com/edit/virtual-scroll-table-sticky-headers

Steps to reproduce:
1. wrap mat-table within a cdk-virtual-scroll-viewport element
2. add sticky: true property to *matHeaderRowDef directive as stated in documentation
3. observe sticky header slide down the viewport after about 10 rows.

#### Expected Behavior
Expect when adding the sticky:true; property to mat-table *matHeaderRowDef directive wrapped within a cdk-virtual-scroll-viewport that the headers remain positioned at the top of the viewport.

#### Actual Behavior
As you scroll the cdk-virtual-scroll-viewport slides the entire mat-table instead of just the row contents wrapped in the tbody element.

#### Environment

- Angular: >= 7
- CDK/Material: >= 7
- Browser(s): chrome, firefox, opera, safari
- Operating System (e.g. Windows, macOS, Ubuntu): all

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

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

Hướng nghiên cứu

Reproduce the problem using the linked StackBlitz examples with mat-table wrapped in cdk-virtual-scroll-viewport and sticky set on matHeaderRowDef. Investigate the interaction between the virtual scroll viewport and table header positioning; done means the header remains at the top while the table contents scroll across the listed browsers.

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ó
4/5
Thời gian dự kiến
3-5 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
35/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.