Sitelet https://github.com/angular/components/issues/31578
Skip to content

bug(cdk/tree): "insertNode" doesn't assign index property in the template's context object #31578

Description

@AStrelkov

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

In the implementation of the insertNode method, a context object is created for the tree node template. However, not all properties are filled in. One important property is missing: index.

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

Assign value of the method's index parameter to the context object.

Actual Behavior

Index property in template's context object is missing.

Environment

  • Angular: 19.2, 20
  • CDK/Material: 19, 20
  • Browser(s): Goggle, Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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