Skip to content

feat(virtual-scroll): Allow non fixed-sized containers #19875

@Goldman90

Description

@Goldman90

Feature Description

When using virtual scroll the element needs to have a set height, or else, by default it'll be 0. It would be really useful for it to be able to have an automatic height.

Use Case

For example, i've got a page with aprox. 37 accordions, each with something between 5 and 15 mat-buttons inside each. When opening one, the opening animation is choppy because of how many are rendered on screen (this bug has already been reported in #8287).
I think this can be mitigated in this use case by only rendering what's visible with a virtual-scroll, but, because the height is dynamic(as, when an accordion needs to open, the size of the containing element changes), i cant give it a specific height, thus i can' use

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/scrollingfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions