Skip to content

Material Tabs + No Template Caching => Broken Virtual Scroll #27230

Open
@exo-pla-net

Description

@exo-pla-net

Description

If you attempt a *cdkVirtualFor with a templateCacheSize: 0, the Virtual Scroll will break when you include a Material Tab in the repeated element.

Reproduction

StackBlitz

Steps to reproduce:

  1. Try scrolling.

Expected Behavior

No broke.

Actual Behavior

Broke.

Workaround

Disable Material Tab pagination as so:

<mat-tab-group [disablePagination]="true">

Environment

Angular CLI: 16.0.0
Node: 18.15.0
Package Manager: npm 9.5.0
OS: win32 x64

Angular: 16.0.0
... animations, cdk, cdk-experimental, cli, common, compiler
... compiler-cli, core, forms, material, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1600.0
@angular-devkit/build-angular 16.0.0
@angular-devkit/core 16.0.0
@angular-devkit/schematics 16.0.0
@angular/fire 7.6.1
@schematics/angular 16.0.0
rxjs 7.8.1
typescript 4.9.5

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/tabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions