mirror of
https://github.com/zhigang1992/reactfire.git
synced 2026-06-19 18:23:57 +08:00
Update app.js
Passed event into handleSubmit, removed return false.
This commit is contained in:
@@ -28,14 +28,13 @@ var CommentList = React.createClass({
|
||||
|
||||
|
||||
var CommentForm = React.createClass({
|
||||
handleSubmit: function(e) {
|
||||
e.preventDefault();
|
||||
handleSubmit: function(event) {
|
||||
event.preventDefault();
|
||||
var author = this.refs.author.getDOMNode().value.trim();
|
||||
var text = this.refs.text.getDOMNode().value.trim();
|
||||
this.props.onCommentSubmit({author: author, text: text});
|
||||
this.refs.author.getDOMNode().value = '';
|
||||
this.refs.text.getDOMNode().value = '';
|
||||
return false;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
||||
Reference in New Issue
Block a user