diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index d04a6b5c18..2daa2a1a6f 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-modal 3.6 +// Type definitions for react-modal 3.8.1 // Project: https://github.com/reactjs/react-modal // Definitions by: Rajab Shakirov , // Drew Noakes , @@ -64,6 +64,9 @@ declare namespace ReactModal { /* Function that will be run after the modal has opened. */ onAfterOpen?(): void; + /* Function that will be run after the modal has closed. */ + onAfterClose?(): void; + /* Function that will be run when the modal is requested to be closed, prior to actually closing. */ onRequestClose?(event: (MouseEvent | KeyboardEvent)): void; diff --git a/types/react-modal/react-modal-tests.tsx b/types/react-modal/react-modal-tests.tsx index 8dfd6d35e3..96c18ea881 100644 --- a/types/react-modal/react-modal-tests.tsx +++ b/types/react-modal/react-modal-tests.tsx @@ -12,6 +12,7 @@ class ExampleOfUsingReactModal extends React.Component { overlayRef: HTMLDivElement; render() { const onAfterOpenFn = () => { }; + const onAfterCloseFn = () => { }; const onRequestCloseFn = () => { }; const customStyle = { overlay: { @@ -59,6 +60,7 @@ class ExampleOfUsingReactModal extends React.Component {