i need e.key and e.target.value but i can't seem to make it work with this code:
const handleInputKeyPress = (e: React.KeyboardEvent<HTMLInputElement> ) => {
if(e.key ==='Enter') {
dfTextQuery(e.target.value)
}
};
why is target not having the value property? and i am getting an error:
Property 'value' does not exist on type 'EventTarget'.
i was expecting with HTMLInputElement, it should work. how do i type e.key and e.target.value with typescript in react?