-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
docs-bug(tree): Replace deprecated NestedTreeControl in example code #29621
Comments
I'm very confused as I still can't find any examples using the new API on the examples tab. It still looks like they are all using the deprecated treeControl. Am I missing something? |
The one titled "Tree with nested nodes, using childAccessor" is using childrenAccessor instead of NestedTreeControl. However, the one titled "Tree with nested nodes" is still using NestedTreeControl. I'm reopening this issue because I think having any examples using a deprecated api is an bug/oversight. At least the examples on the overview tab, the ones people stumble upon first, should be written in a way that doesn't give users deprecation warnings in their IDEs. |
How strange. I'm on v18.2.3 of the docs looking at examples of the mat-tree on the examples tab. I can't see "Tree with nested nodes, using childAccessor" anywhere at all. I can only see "Tree with nested nodes" which is still using the treeControl. https://material.angular.io/components/tree/examples I've even looked at RC and Next version of the docs and can't see it there either. Is there another version I should be looking at? |
Oh wait, I’ve just realized that the new examples are actually on the CDK Tree page in the CDK section of the docs: https://material.angular.io/cdk/tree/examples. It seems like an oversight that these haven’t been updated in the main components section. I hadn’t thought to check the CDK docs, and I’m sure many others might do the same, only finding examples with the deprecated API. It would be great if the main components section could also be updated to include the new examples and avoid confusion. |
Sorry, I was referring to https://material.angular.io/cdk/tree/examples. The components and the cdk have similar looking documentation which confuses me sometimes. |
Well, I am trying to work with a child accessor but I am confused about how to expand particular nodes or expand decedents manually earlier it was like tree control. expand(node) or tree control. expand decedents (node). Any help would be appreciated |
Fixed by #29752. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Documentation Feedback
The example code for the nested tree uses the deprecated NestedTreeControl. Please replace it to show users how to implement a nested tree without it.
Affected documentation pages
The text was updated successfully, but these errors were encountered: