CancelClick prop.

This commit is contained in:
Richard Lewis 2017-08-06 10:29:43 +01:00
parent a22e768343
commit 308d932b2f
2 changed files with 3 additions and 4 deletions

View file

@ -50,6 +50,7 @@ module.exports = React.createClass({
onSaveClick: React.PropTypes.func, onSaveClick: React.PropTypes.func,
onSearchClick: React.PropTypes.func, onSearchClick: React.PropTypes.func,
onLeaveClick: React.PropTypes.func, onLeaveClick: React.PropTypes.func,
onCancelClick: React.PropTypes.func,
}, },
getDefaultProps: function() { getDefaultProps: function() {
@ -57,6 +58,7 @@ module.exports = React.createClass({
editing: false, editing: false,
inRoom: false, inRoom: false,
onSaveClick: function() {}, onSaveClick: function() {},
onCancelClick: function() {},
}; };
}, },
@ -119,9 +121,7 @@ module.exports = React.createClass({
this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId) : this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId) :
null, null,
onFinished: ()=>{ onFinished: ()=>{
if (this._calcSavePromises().length === 0) { this.props.onCancelClick(ev);
this.props.onCancelClick(ev);
}
}, },
}, "mx_IntegrationsManager"); }, "mx_IntegrationsManager");
}, },

View file

@ -90,7 +90,6 @@ module.exports = React.createClass({
propTypes: { propTypes: {
room: React.PropTypes.object.isRequired, room: React.PropTypes.object.isRequired,
onSaveClick: React.PropTypes.func, onSaveClick: React.PropTypes.func,
onCancelClick: React.PropTypes.func,
}, },
getInitialState: function() { getInitialState: function() {