Skip to content

docs(material/tree): add a description of the when predicate #21545

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

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/material/tree/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export class MatTreeNode<T, K = T> extends _MatTreeNodeMixinBase<T, K>

/**
* Wrapper for the CdkTree node definition with Material design styles.
* Captures the node's template and a when predicate that describes when this node should be used.
*/
@Directive({
selector: '[matTreeNodeDef]',
Expand Down Expand Up @@ -139,9 +140,9 @@ export class MatNestedTreeNode<T, K = T> extends CdkNestedTreeNode<T, K>
this._elementRef.nativeElement.classList.add('mat-nested-tree-node');
}

// This is a workaround for https://github.com/angular/angular/issues/23091
// This is a workaround for https://github.com/angular/angular/issues/19145
// In aot mode, the lifecycle hooks from parent class are not called.
// TODO(tinayuangao): Remove when the angular issue #23091 is fixed
// TODO(tinayuangao): Remove when the angular issue #19145 is fixed
ngOnInit() {
super.ngOnInit();
}
Expand Down