Skip to content

Scrolling SDK (virtual-scroll) - View isn't updated when list is updated (items added/removed) #14635

Open
@Gil-Epshtain

Description

@Gil-Epshtain

What is the expected behavior?

If a data-list that binded to <cdk-virtual-scroll-viewport>, is updated (items are added/ removed from this list), the <cdk-virtual-scroll-viewport> updated as well.

What is the current behavior?

Changing the list will not updated the view (<cdk-virtual-scroll-viewport>)

What are the steps to reproduce?

StackBlitz starter: https://stackblitz.com/edit/angular-hsr4tz?file=app%2Fcdk-virtual-scroll-overview-example.html

In this demo you can see that after adding items to the list, the view isn't updated.

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

Angular 7.1.4
Material 7.2.0
Browser: Chrome

Is there anything else we should know?

The documentation doesn't discuss about adding/removing items from data-list.
See docs at: https://material.angular.io/cdk/scrolling/overview

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/scrolling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions