Skip to content

Dynamic viewport height #14037

@Matheo211

Description

@Matheo211

Bug, feature request, or proposal:

Dynamically adjust the size of the table according to its content

What is the expected behavior?

It would be interesting to be able to define only the maxheight of the table and to adjust it dynamically according to the amount of data it contains until it reaches the maxheight. When the size is max height the virtualscrolling is available.

What is the current behavior?

When the cdk-virtual-scroll-viewport has no defined height it does not display all available values. If the height is defined the viewport displays all lines but when it is undefined just a few lines are displayed.

What are the steps to reproduce?

Stackblitz

What is the use-case or motivation for changing an existing behavior?

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

latest cdk-experimental

Is there anything else we should know?

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