question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to pass FieldProps to final form Field component

See original GitHub issue

Describe the bug

<TextField format={val => val.trim()} name="name" label="Name" type="text" />

In this case format is final-form prop, but it is not passed to Field component

Additional context Here I can see that Field component supports only name prop and FieldProps are passed to Material-UI TextFIeld component https://github.com/lookfirst/mui-rff/blob/555e55ff08b1516c929076f49871771a541b54a3/src/TextField.tsx#L15-L24

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lookfirstcommented, Dec 4, 2019

Sorry for the delay. I’ve made fieldProps more consistent. You can now pass in a fieldProps property to any of the elements to define them. You could even override name and render. Published as 1.5.0.

0reactions
lookfirstcommented, Dec 23, 2019

@barnc Oh ffs… you’re totally right… thanks for your patience in explaining things. I’ve published 1.5.7 now that fixes this. Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Final Form Docs – `FieldProps`
FieldProps. These are props that you pass to <Field/> . You must provide one of the ways to render: component , render ,...
Read more >
[bug] typescript FieldRenderProps do not include custom ...
I want to control the component passed to Field props, so making the props optional is not an option. Can we somehow pass...
Read more >
React final form - Unable to pass function to oChange prop
I have a in a form using react final form. I'm trying to pass the value of the current input to a function...
Read more >
<Field /> | Formik
Custom React components will be passed FieldProps which is same render prop parameters of <Field render> plus any other props passed to directly...
Read more >
Input Components - React-admin - Marmelab
Each input component also accepts all react-final-form FieldProps, including: ... root, Styles pass to the underlying FileInput component.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found