Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

Commit 84bedd2

Browse files
asudohtw15egan
authored andcommitted
feat(Modal): ensure passing along evt for onRequestClose()/onRequestSubmit() (#1281)
Resolves #1271.
1 parent 8476abf commit 84bedd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Modal/Modal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ export default class Modal extends Component {
7979

8080
handleKeyDown = evt => {
8181
if (evt.which === 27) {
82-
this.props.onRequestClose();
82+
this.props.onRequestClose(evt);
8383
}
8484
if (evt.which === 13 && this.props.shouldSubmitOnEnter) {
85-
this.props.onRequestSubmit();
85+
this.props.onRequestSubmit(evt);
8686
}
8787
};
8888

@@ -92,7 +92,7 @@ export default class Modal extends Component {
9292
!this.innerModal.contains(evt.target) &&
9393
!this.elementOrParentIsFloatingMenu(evt.target)
9494
) {
95-
this.props.onRequestClose();
95+
this.props.onRequestClose(evt);
9696
}
9797
};
9898

0 commit comments

Comments
 (0)