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
Are you submitting a bug report or a feature request?
What is the current behavior?
FieldInputProps extends AnyObject, creating the assumption that input can include any field beyond the defined values.
What is the expected behavior?
FieldInputProps doesn't extend AnyObject since it's explicit in its declaration what it includes.
Sandbox Link
What's your environment?
React Final Form v6.5.9
Final Form v4.20.7
TypeScript v4.6.2
Other information
The FieldInputProps interface extends an AnyObject interface that is just an index signature. As a result, the code assumes that the input object that exists in the field render props can include any number of fields beyond what is explicitly defined. However, the useField hook that is exported directly and used in the Field component internally explicitly defines the input object with the keys matching the FieldInputProps interface. Given that, there is no reason to have FieldInputProps extend this index signature.
The text was updated successfully, but these errors were encountered:
Are you submitting a bug report or a feature request?
What is the current behavior?
FieldInputProps
extendsAnyObject
, creating the assumption thatinput
can include any field beyond the defined values.What is the expected behavior?
FieldInputProps
doesn't extendAnyObject
since it's explicit in its declaration what it includes.Sandbox Link
What's your environment?
React Final Form v6.5.9
Final Form v4.20.7
TypeScript v4.6.2
Other information
The
FieldInputProps
interface extends anAnyObject
interface that is just an index signature. As a result, the code assumes that theinput
object that exists in the field render props can include any number of fields beyond what is explicitly defined. However, theuseField
hook that is exported directly and used in theField
component internally explicitly defines theinput
object with the keys matching theFieldInputProps
interface. Given that, there is no reason to haveFieldInputProps
extend this index signature.The text was updated successfully, but these errors were encountered: