Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information