angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.28k stars 6.72k forks source link

cdk-virtual-scroll-viewport height zero inside mat-tab (Angular Material) #15622

Open gcjjyy opened 5 years ago

gcjjyy commented 5 years ago

What is the expected behavior?

cd-virtual-scroll-viewport should be displayed normally.

What is the current behavior?

Height is zero. So it shows nothing.

What are the steps to reproduce?

https://stackblitz.com/edit/angular7-virtual-scroll-issue-s9twhk

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular + AngularMaterial + CDK Virtual Scroll Viewport

Is there anything else we should know?

It's very easy to reproduce. Refer to my stackblitz link.

mmalerba commented 5 years ago

mat-tab-group adds some flex containers that need to be expanded to get the height: 100% to work, https://stackblitz.com/edit/angular7-virtual-scroll-issue-9xhc2c?file=src/app/app.component.css