Skip to content

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

Open
@mcrtricolor

Description

@mcrtricolor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: cdk/scrolling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions