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

Method _handleKeydown

src/material/chips/chip-action.ts:125–135  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

123 }
124
125 _handleKeydown(event: KeyboardEvent) {
126 if (
127 (event.keyCode === ENTER || event.keyCode === SPACE) &&
128 !this.disabled &&
129 this._isPrimary &&
130 !this._parentChip._isEditing
131 ) {
132 event.preventDefault();
133 this._parentChip._handlePrimaryActionInteraction();
134 }
135 }
136}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected