Repository navigation
Commit 26ee41e
committed
fix(switch): type the web Space handlers with React Native key events
React Native 0.88 types `onKeyDown` and `onKeyUp` as `KeyDownEvent` and
`KeyUpEvent`, so the DOM `KeyboardEvent` annotations no longer type
check. The handlers only read `nativeEvent.key`, `nativeEvent.repeat`
and `preventDefault()`, which both React Native's event and the React
synthetic event that React Native Web passes provide.1 parent 15bdd3d commit 26ee41e
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
418 | | - | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| |||
424 | 426 | | |
425 | 427 | | |
426 | 428 | | |
427 | | - | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
0 commit comments