angular / angular/components

bug(@angular/cdk-experimental/scrolling): Virtual scrolling (autosize) does not render enough items on collection change

Open
#19,421 0 comments 3 reactions 0 assignees View on GitHub
area: cdk/scrolling P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-ivy-dpsy7f

Steps to reproduce:
1. Click the button

Related to: https://github.com/angular/components/issues/10113

#### Expected Behavior

New items appear to fill the scroll container.

#### Actual Behavior

New items only appear after scrolling.

Before scrolling:
![image](https://user-images.githubusercontent.com/8686683/82657099-121f8500-9c25-11ea-92e9-9388f73426f6.png)

After scrolling:
![image](https://user-images.githubusercontent.com/8686683/82657116-1ba8ed00-9c25-11ea-96ea-c604beda8ee0.png)

#### Environment

- Angular: 9.1.9
- CDK/Material: 9.2.4
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and inspect the Angular CDK experimental scrolling autosize behavior when the collection changes. Confirm the difference between the initial and post-scroll rendering, then add or update coverage for the reproduction so new items fill the scroll container without requiring a scroll.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.