`keydown` event handler; this just passes the event to the `TreeKeyManager`.
(event: KeyboardEvent)
| 885 | |
| 886 | /** `keydown` event handler; this just passes the event to the `TreeKeyManager`. */ |
| 887 | protected _sendKeydownToKeyManager(event: KeyboardEvent): void { |
| 888 | // Only handle events directly on the tree or directly on one of the nodes, otherwise |
| 889 | // we risk interfering with events in the projected content (see #29828). |
| 890 | if (event.target === this._elementRef.nativeElement) { |
| 891 | this._keyManager.onKeydown(event); |
| 892 | } else { |
| 893 | const nodes = this._nodes.getValue(); |
| 894 | for (const [, node] of nodes) { |
| 895 | if (event.target === node._elementRef.nativeElement) { |
| 896 | this._keyManager.onKeydown(event); |
| 897 | break; |
| 898 | } |
| 899 | } |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | /** Gets all nested descendants of a given node. */ |
| 904 | private _getDescendants(dataNode: T): Observable<T[]> { |