angular / angular/components

Expansion panel expanded state issue with Virtual Scroll

未关闭
#13,697 15 条评论 16 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/scrolling area: material/expansion P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### 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

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,检查 cdkVirtualScroll 如何与 matAccordion 和 matExpansionPanel 结合使用。确认展开状态跟随原始项目,而不是跟随其回收后的 viewport 位置,并将此行为作为完成标准。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。