Created
June 6, 2017 11:19
-
-
Save pk936/53cb97762eb81b07c27809d741beda91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class CreateTask extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
checkBoxValues:false | |
} | |
this.handleSubmit = this.handleSubmit.bind(this); | |
} | |
onChange(e){ | |
this.setState({ | |
[e]: !this.state[e] | |
}) | |
} | |
render(){ | |
return ( | |
map function(_keys){ | |
<input type={_keys.type} id={_keys.fid + index} ref={_keys.type + 'NotReq' + Math.random()} value={this.state.checkBoxValues} onChange={()=>this.onChange(_keys.fid + index)}/> | |
} | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment