@@ -44,7 +44,7 @@ class SurveyForm extends Component {
4444 renderInput = ( {
4545 input, label, type, showAsyncValidating, className, styles,
4646 meta : { touched, error, dirty, active, visited, asyncValidating }
47- } ) =>
47+ } ) => (
4848 < div className = { `form-group ${ error && touched ? 'has-error' : '' } ` } >
4949 < label htmlFor = { input . name } className = "col-sm-2" > { label } </ label >
5050 < div className = { `col-sm-8 ${ styles . inputGroup } ` } >
@@ -58,7 +58,8 @@ class SurveyForm extends Component {
5858 { touched && < span className = { styles . touched } title = "Touched" > T</ span > }
5959 </ div >
6060 </ div >
61- </ div > ;
61+ </ div >
62+ ) ;
6263
6364 render ( ) {
6465 const {
@@ -77,23 +78,39 @@ class SurveyForm extends Component {
7778 < div >
7879 < form className = "form-horizontal" onSubmit = { handleSubmit } >
7980 < Field
80- name = "name" type = "text" component = { this . renderInput } label = "Full Name"
81- className = "form-control" styles = { styles }
81+ name = "name"
82+ type = "text"
83+ component = { this . renderInput }
84+ label = "Full Name"
85+ className = "form-control"
86+ styles = { styles }
8287 />
8388
8489 < Field
85- name = "email" type = "text" component = { this . renderInput } label = "Email"
86- className = "form-control" styles = { styles } asyncValidating = { asyncValidating }
90+ name = "email"
91+ type = "text"
92+ component = { this . renderInput }
93+ label = "Email"
94+ className = "form-control"
95+ styles = { styles }
96+ asyncValidating = { asyncValidating }
8797 />
8898
8999 < Field
90- name = "occupation" type = "text" component = { this . renderInput } label = "Occupation"
91- className = "form-control" styles = { styles }
100+ name = "occupation"
101+ type = "text"
102+ component = { this . renderInput }
103+ label = "Occupation"
104+ className = "form-control"
105+ styles = { styles }
92106 />
93107
94108 < Field
95- name = "currentlyEmployed" type = "checkbox" component = { this . renderInput }
96- label = "Currently Employed?" styles = { styles }
109+ name = "currentlyEmployed"
110+ type = "checkbox"
111+ component = { this . renderInput }
112+ label = "Currently Employed?"
113+ styles = { styles }
97114 />
98115
99116 < div className = "form-group" >
0 commit comments