You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
Hi @zwigglers, thanks for reporting this issue.
When dealing with events it's always preferable to use currentTarget instead of target
(you can find more details here and here).
TL;DR: the reason why event.target.value is missing out from the react typings is that, in general, it's impossible to statically type event.target (since, in some cases, it could return a child of the component to which the handler is actually attached). Using currentTarget (which is guaranteed to always return the component that is handling the event), is generally a safer and better-typed option.
I'll keep this issue open just to replace e.target with e.currentTarget in the examples.
There is a problem with the typescript definition for onChange.
textarea onChange event: React.ChangeEvent<HTMLTextAreaElement>
TextareaAutosize onChange event: React.FormEvent<HTMLTextAreaElement>
Consequently, TextareaAutosize event definition is missing out event.target.value
The text was updated successfully, but these errors were encountered: