G
G
Galdar Turin2020-06-04 16:06:21
Angular
Galdar Turin, 2020-06-04 16:06:21

How to solve the problem with ScrollingModule?

Such is the problem, cdk-virtual-scroll-viewport displays data but it is hidden

Code
<cdk-virtual-scroll-viewport itemSize="50">

        <div *cdkVirtualFor="let item of items">
          {{ item.name }}
        </div>

    </cdk-virtual-scroll-viewport>

items = [
    {name: 'name1'},
    {name: 'name2'},
    {name: 'name3'},
    {name: 'name4'},
    {name: 'name5'},
    {name: 'name6'},
    {name: 'name7'}
  ]

If you remove display: block in the styles, then the output data is visible
Img
5ed8f03b82794314984031.png


I removed all my styles, but everything remained the same. I can't figure out why it's not displaying the elements in the browser.
Img

5ed8f1c31ff8f367483261.png
5ed8f1cb89cef868882763.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question