Fix the ref we keep to be the react element and make velociraptor correctly track what nodes it had at the start (c.key not c.props.key)

pull/420/head
David Baker 2015-11-20 18:21:00 +00:00
parent 9ec10e2b43
commit 3cf9f5248b
2 changed files with 2 additions and 6 deletions

View File

@ -23,7 +23,7 @@ module.exports = React.createClass({
this.nodes = {};
var self = this;
React.Children.map(this.props.children, function(c) {
self.children[c.props.key] = c;
self.children[c.key] = c;
});
},

View File

@ -70,10 +70,6 @@ module.exports = React.createClass({
return {menu: false, allReadAvatars: false};
},
componentDidUpdate: function() {
this.readAvatarNode = ReactDom.findDOMNode(this.readAvatarNode);
},
onEditClicked: function(e) {
var MessageContextMenu = sdk.getComponent('molecules.MessageContextMenu');
var buttonRect = e.target.getBoundingClientRect()
@ -209,7 +205,7 @@ module.exports = React.createClass({
},
collectReadAvatarNode: function(node) {
this.readAvatarNode = node;
this.readAvatarNode = ReactDom.findDOMNode(node);
},
render: function() {