-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bugtroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help
Description
What are you trying to do?
I want to use mat-tree-node to present selected nodes from main tree, also as trees. I'm getting the values using Subscription like :
this.chosenProjectsPhasesOrTasksService.getListOfChosenElements().subscribe((value: TreeDataModel[]) => {
console.log(value)
this.dataSource.data = [];
console.log(this.dataSource.data)
this.dataSource.data = JSON.parse(JSON.stringify(value));
console.log(this.dataSource.data)
});
and I can see for example that this.dataSource.data has 4 elements, but on the screen there are only 3
What troubleshooting steps have you tried?
After choosing first value I got it on screen - It's ok. But when I choose more values, then the first one disappears from the screen even though it's still in this.dataSource.data as I've checked in console.log
Environment
- Angular: 7.2.0
- CDK/Material: 7.2.0
- Browser(s): chrome, firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
Metadata
Metadata
Assignees
Labels
needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bugtroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help