babel-plugin-jsx
babel-plugin-jsx copied to clipboard
why the onInput is type 'Event' not 'InputEvent', can get e.target.value
but when I switch to Event, I can't find e.target.value, how I can get the input value through the event
The most easier way to solve this problem is mark event to any.
Not sure why. But you can type cast your (e.target as HTMLInputElement).value
@vutran6853 I think it's about babel-jsx, need to redefine the type of the origin input ?
(e.target as HTMLInputElement).value
@Amour1688 Why is this issue closed? Yes, that is a solution, but that is not expected behavior. How hard would it be to fix this?
plus one for reopening this issue...