angular / angular/components

bug(cdk-virtual-scroll): Only shows a few items when using scrollWindow property

Aperta
#25,336 36 commenti 2 reazioni 0 assegnatari Vedi su GitHub
area: cdk/scrolling P2
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When you use the scrollWindow property it only renderers the initial items (the ones inside your min and max buffer settings) after that it is just blank spaces.

It also happens at the angular material show case example, it only show the first 21 items. I tried to use the checkViewportSize() method but of no use.

https://material.angular.io/cdk/scrolling/overview

### Reproduction

https://stackblitz.com/edit/angular-1uahhp?file=src/app/cdk-virtual-scroll-window-scrolling-example.ts

Steps to reproduce:
1. It already happens on the virtual scrolling window example.

### Expected Behavior

It should render new items as you scroll down the page, eventually rendering all the items.

### Actual Behavior

It stops rendering items after the initial ones are rendered.

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Esegui la riproduzione StackBlitz collegata e confrontala con l'esempio della finestra di scorrimento virtuale di Angular Material. Traccia il comportamento di scrollWindow dall'esempio di scorrimento virtuale e verifica che, scorrendo oltre gli elementi inizialmente memorizzati nel buffer, vengano visualizzati gli elementi successivi invece di uno spazio vuoto in Chrome e Firefox.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.