Last active
April 2, 2018 10:48
-
-
Save karthiks/200b9468325bb7a3cac1cc976e3f04b5 to your computer and use it in GitHub Desktop.
Submit form at the click of an Enter/Return button
This file contains 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
class EditTaskModal extends Component { | |
. | |
. | |
. | |
render() { | |
return ( | |
<form onSubmit={(e)=>this.modifyTask(e)}> | |
<input className="ToDoInput" value={this.state.task} onChange={this.handleEditingTask} /> | |
<button type="submit" className="ToDoSubmit"> Edit </button> | |
</form> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment