MCPcopy Create free account
hub / github.com/angular/components / _getNodeParent

Method _getNodeParent

src/cdk/tree/tree.ts:865–868  ·  view source on GitHub ↗

Given a CdkTreeNode, gets the node that renders that node's parent's data.

(node: CdkTreeNode<T, K>)

Source from the content-addressed store, hash-verified

863
864 /** Given a CdkTreeNode, gets the node that renders that node's parent's data. */
865 _getNodeParent(node: CdkTreeNode<T, K>) {
866 const parent = this._parents.get(this._getExpansionKey(node.data));
867 return parent && this._nodes.value.get(this._getExpansionKey(parent));
868 }
869
870 /** Given a CdkTreeNode, gets the nodes that renders that node's child data. */
871 _getNodeChildren(node: CdkTreeNode<T, K>) {

Callers 1

getParentMethod · 0.80

Calls 2

_getExpansionKeyMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected