angular / angular/components

bug(cdk-virtual-scroll-viewport): Content not present in SSR load

Aperta
#24,956 7 commenti 5 reazioni 0 assegnatari Vedi su GitHub
area: cdk/scrolling P3
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 rendering a page in SSR mode, the content for the virtual scroll is not rendered. It's blank. The page works fine when rendered in the browser. Screenshot attached for the SSR load response
Screenshot 2022-05-23 at 4 31 22 PM
:

### Reproduction

Steps to reproduce:
1. Clone the repo https://github.com/bivs06/angular-universal-ssr-bug
2. Run `npm run dev:ssr`
3. Check the response in the network tab

StackBlitz link: https://stackblitz.com/edit/angular-ivy-kfyv87?file=src%2Fapp%2Fapp.component.html

### Expected Behavior

The items for virtual scroll should load in SSR load

### Actual Behavior

The items for the virtual scroll are not loading in the SSR load

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Clona il repository angular-universal-ssr-bug collegato ed esegui `npm run dev:ssr`; confronta la risposta di rete con la pagina renderizzata dal browser. Inizia con la riproduzione in `src/app/app.component.html` del link StackBlitz e con il comportamento di `cdk-virtual-scroll-viewport`. È completato quando gli elementi di virtual-scroll compaiono sia nella risposta SSR sia nel browser.

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.