@@ -381,7 +381,7 @@ export class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer,
381381 // Node context that will be provided to created embedded view
382382 const context = new CdkTreeNodeOutletContext < T > ( nodeData ) ;
383383
384- parentData ??= this . _parents . get ( this . _trackExpansionKey ( nodeData ) ) ?? undefined ;
384+ parentData ??= this . _parents . get ( this . _getExpansionKey ( nodeData ) ) ?? undefined ;
385385 // If the tree is flat tree, then use the `getLevel` function in flat tree control
386386 // Otherwise, use the level of parent node.
387387 const levelAccessor = this . _getLevelAccessor ( ) ;
@@ -533,7 +533,7 @@ export class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer,
533533 _getDirectChildren ( dataNode : T ) : Observable < T [ ] > {
534534 const levelAccessor = this . _getLevelAccessor ( ) ;
535535 if ( levelAccessor && this . _expansionModel ) {
536- const key = this . _trackExpansionKey ( dataNode ) ;
536+ const key = this . _getExpansionKey ( dataNode ) ;
537537 const isExpanded = this . _expansionModel . changed . pipe (
538538 switchMap ( changes => {
539539 if ( changes . added . includes ( key ) ) {
@@ -587,13 +587,13 @@ export class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer,
587587 * This primarily facilitates keyboard navigation.
588588 */
589589 _registerNode ( node : CdkTreeNode < T , K > ) {
590- this . _nodes . value . set ( this . _trackExpansionKey ( node . data ) , node ) ;
590+ this . _nodes . value . set ( this . _getExpansionKey ( node . data ) , node ) ;
591591 this . _nodes . next ( this . _nodes . value ) ;
592592 }
593593
594594 /** Removes the specified node component from the tree's internal registry. */
595595 _unregisterNode ( node : CdkTreeNode < T , K > ) {
596- this . _nodes . value . delete ( this . _trackExpansionKey ( node . data ) ) ;
596+ this . _nodes . value . delete ( this . _getExpansionKey ( node . data ) ) ;
597597 this . _nodes . next ( this . _nodes . value ) ;
598598 }
599599
@@ -660,7 +660,7 @@ export class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer,
660660 switchMap ( children => {
661661 // Here, we cache the parents of a particular child so that we can compute the levels.
662662 for ( const child of children ) {
663- this . _parents . set ( this . _trackExpansionKey ( child ) , dataNode ) ;
663+ this . _parents . set ( this . _getExpansionKey ( child ) , dataNode ) ;
664664 }
665665 return observableOf ( ...children ) . pipe (
666666 concatMap ( child => concat ( observableOf ( [ child ] ) , this . _getAllChildrenRecursively ( child ) ) ) ,
0 commit comments