Skip to content

bug(mat-nested-tree-node): Indent increases by level #30791

@tonyhook

Description

@tonyhook

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When we use matTreeNodePadding on , the indent should always be 40px because the div element is embedded in its parent div element. It should be different with .

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-jotfnbjm
Steps to reproduce:

  1. click apple
  2. click pie

Expected Behavior

The indent should keep 40px for all nested tree nodes.

Actual Behavior

The indent is 40px for level 1, 80px for level 2 ...

Environment

  • Angular: 19.2.4
  • CDK/Material: 19.2.7
  • Browser(s): Chrome, Safari
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions