Skip to content

Instantly share code, notes, and snippets.

@pk936
Created June 6, 2017 11:19
Show Gist options
  • Save pk936/53cb97762eb81b07c27809d741beda91 to your computer and use it in GitHub Desktop.
Save pk936/53cb97762eb81b07c27809d741beda91 to your computer and use it in GitHub Desktop.
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