Skip to content

Commit 86b1722

Browse files
handle todos which are in default
1 parent fe4a94f commit 86b1722

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ep18-edit-todo-part2/app/components/DisplayItem.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export default class DisplayItem extends React.Component {
77
this.state = { editing: false }
88
}
99

10+
componentDidMount () {
11+
this.setState({ changedText: this.props.todo.title });
12+
}
13+
1014
handleEditing (event) {
1115
this.setState({ editing: true, changedText: this.props.todo.title });
1216
}

0 commit comments

Comments
 (0)