From 308d932b2f02c6ed2120828af1f22e4401b4bd41 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Sun, 6 Aug 2017 10:29:43 +0100 Subject: [PATCH] CancelClick prop. --- src/components/views/rooms/RoomHeader.js | 6 +++--- src/components/views/rooms/RoomSettings.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index d4e390f750..66b0eab3e7 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -50,6 +50,7 @@ module.exports = React.createClass({ onSaveClick: React.PropTypes.func, onSearchClick: React.PropTypes.func, onLeaveClick: React.PropTypes.func, + onCancelClick: React.PropTypes.func, }, getDefaultProps: function() { @@ -57,6 +58,7 @@ module.exports = React.createClass({ editing: false, inRoom: false, onSaveClick: function() {}, + onCancelClick: function() {}, }; }, @@ -119,9 +121,7 @@ module.exports = React.createClass({ this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId) : null, onFinished: ()=>{ - if (this._calcSavePromises().length === 0) { - this.props.onCancelClick(ev); - } + this.props.onCancelClick(ev); }, }, "mx_IntegrationsManager"); }, diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 1baaf3aaa9..0c1372f54e 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -90,7 +90,6 @@ module.exports = React.createClass({ propTypes: { room: React.PropTypes.object.isRequired, onSaveClick: React.PropTypes.func, - onCancelClick: React.PropTypes.func, }, getInitialState: function() {