Some redux-form properties doesn't change
See original GitHub issueWell, I wrapped your component into Field
by redux-form
and trying to get some meta information, like that:
class wrappedPhone extends React.Component {
/* ... */
render() {
console.log(this.props.meta); <------- this one
const { input } = this.props;
return (
<Phone
value={input.value}
onChange={this.handleOnChange}
/>
);
}
}
<Field
name="phone"
component={wrappedPhone}
/>
and while trying to focus/blur/change field there are at least visited
and touched
meta props doesn’t change.
For simple input
it works ok.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Form input using Redux Form not updating - Stack Overflow
I changed it from input to something else and it totally broke redux-form SILENTLY. const TextInput = ({ input, <--- DO NOT CHANGE...
Read more >props - Redux Form
change (field:String, value:any) : Function Changes the value of a field in the Redux store. This is a bound action creator, so it...
Read more >reduxForm(config:Object)
A callback function that will be called with all the form values any time any of the form values change. onChange will be...
Read more >Field - Redux Form
A callback that will be called whenever an onChange event is fired from the underlying input. If you call event.preventDefault() , the CHANGE...
Read more >reduxForm(config:Object)
a function that takes all the form values, the dispatch function, the props given to your component and the current blurred field, and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For those who will come to this issue as well as me, the solution is quite simple:
No, it’s purely a
redux-form
thing. It applies to any React component. The only way is to pass{...this.props}
to the component being wrapped.