Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(material/tree): node added with insertNode remains visible after dataSource is updated #29349

Open
1 task
GeorgianStan opened this issue Jun 28, 2024 · 0 comments
Labels
area: cdk/tree P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@GeorgianStan
Copy link
Contributor

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

I'm using Material Tree and insertNode method to create a node inside the tree menu.

Reproduction

StackBlitz link
Steps to reproduce:

  1. Open the app and focus inside the document
  2. Press a to add a new node using insertNode method
  3. Press r to restore the data to the initial state.

Expected Behavior

I expect that when the data object is populated, only the nodes passed in this array should be on the interface.

Actual Behavior

A ghost node is added.

Environment

@angular-devkit/architect       0.1703.7
@angular-devkit/build-angular   17.3.7
@angular-devkit/core            17.3.7
@angular-devkit/schematics      17.3.7
@angular/cli                    17.3.7
@schematics/angular             17.3.7
ng-packagr                      17.3.0
rxjs                            7.8.1
typescript                      5.4.5
webpack                         5.90.3
zone.js                         0.14.5

This is also in v18.

@GeorgianStan GeorgianStan added the needs triage This issue needs to be triaged by the team label Jun 28, 2024
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: cdk/tree and removed needs triage This issue needs to be triaged by the team labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/tree P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
2 participants