(target: HTMLInputElement, key: string)
| 1203 | ]); |
| 1204 | |
| 1205 | function isValidInputKey(target: HTMLInputElement, key: string) { |
| 1206 | // Only space should toggle checkboxes and radios, not enter. |
| 1207 | return target.type === 'checkbox' || target.type === 'radio' |
| 1208 | ? key === ' ' |
| 1209 | : nonTextInputTypes.has(target.type); |
| 1210 | } |
no test coverage detected