input value can't be edit
See original GitHub issueimport React,{Component} from 'react';
import { Field, reduxForm } from 'redux-form';
const renderInput = field =>{
return (
<input {...field.input} type={field.type}/>
)
}
const ContactPage =(props)=>(
<div>
<Field
name="otherMoney"
component={renderInput}
type="text"
/>
</div>
)
export default reduxForm({
form: 'recharge-form'
})(ContactPage);
My Component successfully renders and I can see all the actions being dispatched inside the Redux Dev tools window, but when I try to enter text into the fields it won’t do any thing, however the actions are dispatched like I said.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Why can't I change my input value in React even with the ...
I made one component, passed props to it from a store, on componentWillMount I make a new state for component. Rendering is fine...
Read more >HTML input readonly Attribute - W3Schools
A read-only input field cannot be modified (however, a user can tab to it, highlight it, and copy the text from it). The...
Read more >Unable to type in Input field issue in React [Solved] | bobbyhadz
To solve the issue of being unable to type in an input field in React, make sure to use the `defaultValue` prop instead...
Read more >Make React Input TextField Editable with value state and ...
https://codedocu.com/Software/React/Components/Make-React- Input -Editable?27531. Use defaultValue instead of value2. React TextField or Form ...
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 FreeTop 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
Top GitHub Comments
I can see now that the problem is that I’m trying to use
redux-form
and I should useredux-form/immutable
instead. From hereMake sure you are mounting your reducer in the right place. It must be under
form
in your redux state.