angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.36k stars 6.74k forks source link

Treegrid in 18.2 #29613

Open apollisa opened 2 months ago

apollisa commented 2 months ago

Hello,

Since 18.2, FlatTreeControl, MatTreeFlatDataSource and MatTreeFlattener are deprecated, and I was relying on them to create a treegrid, as suggested by @andrewseguin in https://github.com/angular/components/issues/15187#issuecomment-463715842:

You should be able to do this using the table currently, and to make it easier you can use the TreeControl to help you traverse your data and manage expansion state https://stackblitz.com/edit/angular-m77g7e-semvxp?file=app%2Ftable-basic-example.html

So I was wondering if there was a new recommended way of creating a treegrid, or if I needed to reimplement those deprecated classes. 🤔

Thanks for your help!

jimivdw commented 2 months ago

Tagging along here for the more general use case of using the programmatic implementation of the tree without actually using the CdkTree/MatTree components. Do I now have to use a CdkTree component just for the tree "behavior"? Or is there anything else I can do (besides just building my own)?

f-mon commented 1 month ago

same problem for me. I would be grateful if you could indicate a valid alternative to those classes to implement a tree table. I was very surprised to see them deprecated in the new version

faraz-ahmad-uft commented 1 month ago

I am facing the same issue.

Please comment If someone has any alternate approach for the deprecated classes.

floreauwe commented 1 month ago

Hi guys, I have the same issue as you...any news on some alternative to fix this deprecation?