MCPcopy Index your code
hub / github.com/angular/components / _getNodeChildren

Method _getNodeChildren

src/cdk/tree/tree.ts:871–884  ·  view source on GitHub ↗

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

(node: CdkTreeNode<T, K>)

Source from the content-addressed store, hash-verified

869
870 /** Given a CdkTreeNode, gets the nodes that renders that node's child data. */
871 _getNodeChildren(node: CdkTreeNode<T, K>) {
872 return this._getDirectChildren(node.data).pipe(
873 map(children =>
874 children.reduce<CdkTreeNode<T, K>[]>((nodes, child) => {
875 const value = this._nodes.value.get(this._getExpansionKey(child));
876 if (value) {
877 nodes.push(value);
878 }
879
880 return nodes;
881 }, []),
882 ),
883 );
884 }
885
886 /** `keydown` event handler; this just passes the event to the `TreeKeyManager`. */
887 protected _sendKeydownToKeyManager(event: KeyboardEvent): void {

Callers 1

getChildrenMethod · 0.80

Calls 4

_getDirectChildrenMethod · 0.95
_getExpansionKeyMethod · 0.95
getMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected