davidkpiano / react-redux-form

Create forms easily in React with Redux.
https://davidkpiano.github.io/react-redux-form
MIT License
2.07k stars 251 forks source link

Control.radio default check in localform #1228

Open AnkitBagaria24 opened 4 years ago

AnkitBagaria24 commented 4 years ago

How do I check by default a Control.radio in LocalForm ?

<Control.radio model={"."+e.employeeid} name={e.employeeid} value="present" onChange={handleInputChange}/>
<Control.radio model={"."+e.employeeid} name={e.employeeid} value="absent" onChange={handleInputChange} />

In state initial value of all the employeeid is absent I want the radio button corresponding to value absent to be checked initially.