angular / angular/components

Scrolling SDK (virtual-scroll) - View isn't updated when list is updated (items added/removed)

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

描述

#### What is the expected behavior?
If a data-list that binded to ``, is updated (items are added/ removed from this list), the `` updated as well.

#### What is the current behavior?
Changing the list will not updated the view (``)

#### What are the steps to reproduce?
StackBlitz starter: https://stackblitz.com/edit/angular-hsr4tz?file=app%2Fcdk-virtual-scroll-overview-example.html

In this demo you can see that after adding items to the list, the view isn't updated.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.1.4
Material 7.2.0
Browser: Chrome

#### Is there anything else we should know?
The documentation doesn't discuss about adding/removing items from data-list.
See docs at: https://material.angular.io/cdk/scrolling/overview

贡献指南

打开贡献指南

调研方向

通过向绑定到 cdk-virtual-scroll-viewport 的列表中添加和移除项目,复现链接的 StackBlitz 示例中的行为。阅读 CDK 滚动概览,并追踪其中涉及的 virtual-scroll 行为;完成标准是视口反映列表更改,并且文档解释这一行为。

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

评估

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

把新 issue 发到你的邮箱

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