angular / angular/components

Virtual scroll collectionViewer.viewChange does not emit when initial value was provided

Open
#16,924 6 comments 2 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-lakoup

Steps to reproduce:
1. Open stackblitz
2. Monitor the console and confirm that `collectionViewer.viewChange`does not emit


#### Expected Behavior

I am expecting `collectionViewer.viewChange`to fire

#### Actual Behavior

It does not fire, if the `_dataStream` has an initial value

#### Environment

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

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and inspect the virtual-scroll path involving collectionViewer.viewChange and the _dataStream initial value. Confirm the missing emission in the console, then trace the relevant CDK source and tests. Done means viewChange emits when the data stream already has an initial value, with regression coverage for that case.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.