Skip to content

mat select multi with virtual scroll loses context of selection #15902

@LouisF410

Description

@LouisF410

What is the expected behavior?

cdk-virtual-scroll-viewport inside mat select with multiple should persist selected values.

What is the current behavior?

When selecting and scrolling, when items are out of render buffer the list loses it selected context.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-gvgfxs
Select Description 120 - 123 and scroll away, when returning to items they are deselected.

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

"@angular/animations": "7.2.11"
"@angular/cdk": "^7.3.6"
"@angular/common": "7.2.11"
"@angular/compiler": "7.2.11"
"@angular/compiler-cli": "7.2.11"
"@angular/core": "7.2.11"
"@angular/forms": "7.2.11"
"@angular/http": "7.2.11"
"@angular/material": "^7.3.6"
"@angular/platform-browser": "7.2.11"
"@angular/platform-browser-dynamic": "7.2.11"
"@angular/platform-server": "7.2.11"
"@angular/router": "7.2.11"
"typescript": "3.2.4"
"zone.js": "^0.8.29"

OS: Linux_x64
Browser: Chrome

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/scrollingarea: material/select

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions