mirror of https://github.com/vector-im/riot-web
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)
parent
9ec10e2b43
commit
3cf9f5248b
|
@ -23,7 +23,7 @@ module.exports = React.createClass({
|
||||||
this.nodes = {};
|
this.nodes = {};
|
||||||
var self = this;
|
var self = this;
|
||||||
React.Children.map(this.props.children, function(c) {
|
React.Children.map(this.props.children, function(c) {
|
||||||
self.children[c.props.key] = c;
|
self.children[c.key] = c;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -70,10 +70,6 @@ module.exports = React.createClass({
|
||||||
return {menu: false, allReadAvatars: false};
|
return {menu: false, allReadAvatars: false};
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidUpdate: function() {
|
|
||||||
this.readAvatarNode = ReactDom.findDOMNode(this.readAvatarNode);
|
|
||||||
},
|
|
||||||
|
|
||||||
onEditClicked: function(e) {
|
onEditClicked: function(e) {
|
||||||
var MessageContextMenu = sdk.getComponent('molecules.MessageContextMenu');
|
var MessageContextMenu = sdk.getComponent('molecules.MessageContextMenu');
|
||||||
var buttonRect = e.target.getBoundingClientRect()
|
var buttonRect = e.target.getBoundingClientRect()
|
||||||
|
@ -209,7 +205,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
collectReadAvatarNode: function(node) {
|
collectReadAvatarNode: function(node) {
|
||||||
this.readAvatarNode = node;
|
this.readAvatarNode = ReactDom.findDOMNode(node);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Reference in New Issue