Skip to content

Commit

Permalink
DEPRECATED:
Browse files Browse the repository at this point in the history
 - MatTreeFlatDataSource deprecated. Use levelAccessor or
   childrenAccessor instead of TreeController
  • Loading branch information
zarend committed Oct 6, 2023
1 parent 59443e8 commit 8112e2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/material/tree/data-source/flat-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export class MatTreeFlattener<T, F, K = F> {
* to `MatTree`.
* The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted
* to type `F` for `MatTree` to consume.
*
* @deprecated Use one of levelAccessor or childrenAccessor instead. To be removed in a future
* version.
* @breaking-change 19.0.0
*/
export class MatTreeFlatDataSource<T, F, K = F> extends DataSource<F> {
private readonly _flattenedData = new BehaviorSubject<F[]>([]);
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/material/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class MatTree<T, K = T> extends CdkTree<T, K> {
static ɵfac: i0.ɵɵFactoryDeclaration<MatTree<any, any>, never>;
}

// @public
// @public @deprecated
export class MatTreeFlatDataSource<T, F, K = F> extends DataSource<F> {
constructor(_treeControl: FlatTreeControl<F, K>, _treeFlattener: MatTreeFlattener<T, F, K>, initialData?: T[]);
// (undocumented)
Expand Down

0 comments on commit 8112e2a

Please sign in to comment.