Open ronlawrence3 opened 1 month ago
I had the same feelings, after trying a few stuff, I realised that when you add #node=matNestedTreeNode
on your mat-nested-tree-node
tag, then you have access node.isExpanded
in place of the treeControl.isExpanded(dataNode)
.
But indeed there is something to do with the documentation associated to this deprecation notice.
As I was trying to migrate to, I found it through API documentation. You can use MatTree to expand/collapse/isExpanded with, for example:
@ViewChild(MatTree)
tree: MatTree
I agree though, documentation is not yet ready to guide us and migrate away from deprecated features. It looks like non-TreeControl implementation is not mature enough anyway for now.
Is this a regression?
The previous version in which this bug was not present was
No response
Description
mat-tree has [treeControl] (and many other related classes and parts) deprecated. How are we supposed to control the expansion state of the tree from our component if there is to no treeControl? Was this an oversight in documentation? even your own examples in the documentation use the deprecated features!
Reproduction
N/A
Expected Behavior
I expect deprecated features / componenets / classes to have a new replacement or documentation on HOW to use the new way of doing things that accounts for the deprecated feature.
Actual Behavior
In this case (CdkTree):
levelAccessor and childrenAccessor have nothing to do with expansion state. Please tell us what we are supposed to use in place of treeControl!
Environment