You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Pass false to onFinished from BaseDialog
Everywhere else, onFinished takes a boolean indicating whether the dialog was confirmed on cancelled, and had function that were expecting this variable and getting undefined.
This commit is contained in:
@@ -36,6 +36,9 @@ export default React.createClass({
|
|||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
// onFinished callback to call when Escape is pressed
|
// onFinished callback to call when Escape is pressed
|
||||||
|
// Take a boolean which is true is the dialog was dismissed
|
||||||
|
// with a positive / confirm action or false if it was
|
||||||
|
// cancelled (from BaseDialog, this is always false).
|
||||||
onFinished: PropTypes.func.isRequired,
|
onFinished: PropTypes.func.isRequired,
|
||||||
|
|
||||||
// called when a key is pressed
|
// called when a key is pressed
|
||||||
@@ -77,12 +80,12 @@ export default React.createClass({
|
|||||||
if (e.keyCode === KeyCode.ESCAPE) {
|
if (e.keyCode === KeyCode.ESCAPE) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.props.onFinished();
|
this.props.onFinished(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCancelClick: function(e) {
|
_onCancelClick: function(e) {
|
||||||
this.props.onFinished();
|
this.props.onFinished(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user