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
Describe the bug
When trying to assign a ref of type HTMLTextAreaElement to a TextField.TextArea element, there is a type error of
Type 'HTMLTextAreaElement' is not assignable to type 'HTMLFormElement | ((el: HTMLFormElement) => void) | undefined'.
Type 'HTMLTextAreaElement' is missing the following properties from type 'HTMLFormElement': acceptCharset, action, elements, encoding, and 11 more.ts(2322)
A similar type mismatch happens when using a callback for the ref prop.
To Reproduce
Steps to reproduce the behavior:
Declare a new ref variable with type HTMLTextAreaElement
Create a new TextField.TextArea element
Assign the variable to the ref prop of the TextArea
See TypeScript error
Expected behavior
There should be no type errors at all.
Additional context
Seems like the ref prop had the type HTMLTextAreaElement previously, but was changed to HTMLFormElement in #381. Was this intended?
The text was updated successfully, but these errors were encountered:
Thanks for the report, HTMLTextAreaElement should extend HTMLFormElement and not cause any type errors but I might've been mistaken, I'll have a look and fix the type.
Describe the bug
When trying to assign a
ref
of typeHTMLTextAreaElement
to aTextField.TextArea
element, there is a type error ofA similar type mismatch happens when using a callback for the
ref
prop.To Reproduce
Steps to reproduce the behavior:
ref
variable with typeHTMLTextAreaElement
TextField.TextArea
elementref
prop of theTextArea
Expected behavior
There should be no type errors at all.
Additional context
Seems like the
ref
prop had the typeHTMLTextAreaElement
previously, but was changed toHTMLFormElement
in #381. Was this intended?The text was updated successfully, but these errors were encountered: