angular / angular/components

Expansion panel expanded state issue with Virtual Scroll

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

#### Bug, feature request, or proposal:

`cdkVirtualScroll` does not work properly with `matAccordion` and `matExpansionPanel`.

The accordion does not respect the expansion state of individual expansion panels as you scroll.

#### What is the expected behavior?
The expansion state is maintained as you scroll

#### What is the current behavior?
If you expand the xth item in the accordion then as you scroll, the xth in the view will always be expanded. ie if you expand the 3rd item then as you scroll down to say the 1000th item then the 1003rd item will be expanded.

#### What are the steps to reproduce?
[Stackblitz example](https://stackblitz.com/edit/virtual-scroll-expansion-panels)

#### What is the use-case or motivation for changing an existing behavior?
Able to use expansion panels inside virtual scroll

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.0
Material 7.0
MacOS 10.14
TypeScript 3.x
Browser Chrome 70.0

#### Is there anything else we should know?
No

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 bản tái hiện StackBlitz được liên kết và kiểm tra cách cdkVirtualScroll được kết hợp với matAccordion và matExpansionPanel. Xác nhận rằng trạng thái mở rộng đi theo mục ban đầu thay vì vị trí viewport được tái sử dụng của mục đó, và dùng hành vi này làm tiêu chí hoàn thành.

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
38/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.