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

Method _getExpansionKey

src/cdk/tree/tree.ts:953–962  ·  view source on GitHub ↗
(dataNode: T)

Source from the content-addressed store, hash-verified

951 }
952
953 private _getExpansionKey(dataNode: T): K {
954 // In the case that a key accessor function was not provided by the
955 // tree user, we'll default to using the node object itself as the key.
956 //
957 // This cast is safe since:
958 // - if an expansionKey is provided, TS will infer the type of K to be
959 // the return type.
960 // - if it's not, then K will be defaulted to T.
961 return this.expansionKey?.(dataNode) ?? (dataNode as unknown as K);
962 }
963
964 private _getAriaSet(node: T) {
965 const key = this._getExpansionKey(node);

Callers 15

_initializeKeyManagerMethod · 0.95
_initializeDataDifferMethod · 0.95
insertNodeMethod · 0.95
isExpandedMethod · 0.95
toggleMethod · 0.95
expandMethod · 0.95
collapseMethod · 0.95
expandDescendantsMethod · 0.95
collapseDescendantsMethod · 0.95
_getDirectChildrenMethod · 0.95
_findChildrenByLevelMethod · 0.95
_registerNodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected