Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onAfterClose prop passing #708

Closed
ibrahimovfuad opened this issue Oct 25, 2018 · 2 comments · Fixed by #724
Closed

onAfterClose prop passing #708

ibrahimovfuad opened this issue Oct 25, 2018 · 2 comments · Fixed by #724

Comments

@ibrahimovfuad
Copy link

Summary:

Hi!
ReactModal component can accept onAfterOpen prop, but I need to use something like onAfterClose but i don't see it in docs.

Expected behavior:

Need to pass onAfterClose as prop.

@diasbruno
Copy link
Collaborator

Hi @ibrahimovfuad. You can achieve this using onRequestClose function.

@jcrben
Copy link

jcrben commented Nov 16, 2018

UPDATE: found this in a PR at #346 - but the submitter ended up using componentWillUnmount() instead

According to the docs http://reactcommunity.org/react-modal/#usage:

Function that will be run when the modal is requested to be closed (either by clicking on overlay or pressing ESC)
Note: It is not called if isOpen is changed by other means.

It does not seem like there's a hook in the onAfterClose()?

afterClose = () => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants