diff --git a/todos/src/list-item.jsx b/todos/src/list-item.jsx index 19e8951..82a9ad8 100644 --- a/todos/src/list-item.jsx +++ b/todos/src/list-item.jsx @@ -23,6 +23,7 @@ module.exports = React.createClass({ /> - - - + return [ + , + + ] } }, + handleSaveClick: function() { + this.fb.update({text: this.state.text}); + this.setState({textChanged: false}); + }, + handleUndoClick: function() { + this.setState({ + text: this.props.item.text, + textChanged: false + }); + }, handleTextChange: function(event) { this.setState({ text: event.target.value,