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

Method _sendKeydownToKeyManager

src/cdk/tree/tree.ts:887–901  ·  view source on GitHub ↗

`keydown` event handler; this just passes the event to the `TreeKeyManager`.

(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

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[]> {

Callers

nothing calls this directly

Calls 2

onKeydownMethod · 0.65
getValueMethod · 0.45

Tested by

no test coverage detected