don't reset RoomHeader every time the props change due to RoomView re-rendering during edits
This commit is contained in:
parent
12db0d9130
commit
86807b631d
1 changed files with 5 additions and 1 deletions
|
@ -49,8 +49,12 @@ module.exports = React.createClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInitialState: function() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function(newProps) {
|
componentWillReceiveProps: function(newProps) {
|
||||||
if (newProps.editing) {
|
if (this.props.room !== newProps.room && newProps.editing) {
|
||||||
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
|
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
|
||||||
var name = this.props.room.currentState.getStateEvents('m.room.name', '');
|
var name = this.props.room.currentState.getStateEvents('m.room.name', '');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue