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
Add otherProp to FieldRenderProps interface (#716)
I believe that the FieldRenderProps interface is typed incorrectly, it should actually allow `[otherProp: string]: any;`. Trying to access props other than `input` or `meta` will currently result in a Typescript error.
As shown in the docs (here)[https://final-form.org/docs/react-final-form/types/FieldProps#children] arbitrary props assigned to the `Field` component are passed through to the renderProp.
```js
<Field name="myField" someArbitraryOtherProp={42}>
{props => {
console.log(props.someArbitraryOtherProp) // would print 42
return <input {...props.input}/>
}}
</Form>
```
We can see the passing of props in the `renderComponent` module here: https://github.com/final-form/react-final-form/blob/master/src/renderComponent.js#L25
0 commit comments