-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
Description
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
A function with an event arg of type KeyboardEvent should for the onKeyDown event handler.
Current Behavior
This event handler expects KeyboardEvent which is counter intuitive.
Steps to Reproduce
<TextField
onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {}}
/>
Context
I'm using typescript in our environment and some TextField events like onChange will use HTMLInputElement type but the key down event expected HTMLDivElement. I would have expected all event handlers to use the same types.
Your Environment
| Tech | Version |
|---|---|
| Material-UI | v^1.1.0 |
| React | v^16.3.2 |
| Chrome | v68.0.3440.106 |
| TypeScript | v2.8.4 |