Skip to content

bug(tree): Leaf nodes are not collapsed if top-level folder is collapsed #20665

Closed
@helmbold

Description

@helmbold

Reproduction

The bug is reproducible with the flat tree example in the official documentation. What is the same as the respective Stackblitz example.

Steps to reproduce:

  1. Expand "Vegetables" node and then "Green" and "Orange" nodes.
  2. Collapse "vegetables"

Expected Behavior

All nodes under "Vegetables" should disappear (should be collapsed).

Actual Behavior

"Green" and "Orange" disappear, but the leaf nodes are still visible.

Expanded nodes:
image

After collapsing "Vegetables":
image

Environment

  • Angular: 10.2.2
  • CDK/Material: 10.2.2
  • Browser(s): Chrome 85
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions