Commit e57f3e92 authored by Vasa's avatar Vasa

getDOMNode() has been deprecated. Use React.findDOMNode() instead

parent 413cfaab
......@@ -35,17 +35,17 @@ var app = app || {};
},
handleNewTodoKeyDown: function (event) {
if (event.which !== ENTER_KEY) {
if (event.keyCode !== ENTER_KEY) {
return;
}
event.preventDefault();
var val = this.refs.newField.getDOMNode().value.trim();
var val = React.findDOMNode(this.refs.newField).value.trim();
if (val) {
this.props.model.addTodo(val);
this.refs.newField.getDOMNode().value = '';
React.findDOMNode(this.refs.newField).value = '';
}
},
......
......@@ -67,7 +67,7 @@ var app = app || {};
*/
componentDidUpdate: function (prevProps) {
if (!prevProps.editing && this.props.editing) {
var node = this.refs.editField.getDOMNode();
var node = React.findDOMNode(this.refs.editField);
node.focus();
node.setSelectionRange(node.value.length, node.value.length);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
"private": true,
"dependencies": {
"director": "^1.2.0",
"react": "^0.12.0",
"react": "^0.13.3",
"todomvc-app-css": "^1.0.0",
"todomvc-common": "^1.0.1"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment