Virtual scroll collectionViewer.viewChange does not emit when initial value was provided
Open
Nobody has claimed this yet.
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:
- Open stackblitz
- Monitor the console and confirm that
collectionViewer.viewChangedoes not emit
Expected Behavior
I am expecting collectionViewer.viewChangeto 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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