File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed
src/Components/forms/inputs Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ export default class VolunteerForm extends Component {
28
28
guidePeople,
29
29
techSkill,
30
30
otherSkill,
31
- employer
31
+ employer,
32
+ displayDropdown
32
33
} = this . props
33
34
34
35
return (
@@ -110,29 +111,25 @@ export default class VolunteerForm extends Component {
110
111
isEmpty = { errors . industry }
111
112
label = "What industry are you in?"
112
113
/>
114
+
113
115
< DropDown
114
- onChange = {
115
- ( onChange ,
116
- e => {
117
- return this . setState ( {
118
- displayDropdown : e . target . value === 'Employer'
119
- } )
120
- } )
121
- }
116
+ onChange = { onChange }
122
117
value = { hearAboutCYF }
123
118
name = "hearAboutCYF"
124
119
arrayList = { ListsData . hearAboutCYFList }
125
120
isEmpty = { errors . hearAboutCYF }
126
121
label = "Where did you hear about Code Your Future?"
127
122
/>
128
- < DropDown
129
- onChange = { onChange }
130
- value = { employer }
131
- name = "employer"
132
- arrayList = { ListsData . employer }
133
- isEmpty = { errors . employer }
134
- label = "Who is your employer?"
135
- />
123
+ { displayDropdown && (
124
+ < DropDown
125
+ onChange = { onChange }
126
+ value = { employer }
127
+ name = "employer"
128
+ arrayList = { ListsData . employer }
129
+ isEmpty = { errors . employer }
130
+ label = "Who is your employer?"
131
+ />
132
+ ) }
136
133
< span className = "contact-interested" >
137
134
< span >
138
135
What would you like help Code Your Future with, and what is your
You can’t perform that action at this time.
0 commit comments