minutemailer / react-popup

React popup component
http://minutemailer.github.io/react-popup/
MIT License
208 stars 71 forks source link

Callback for popup.close() #58

Closed Jeerjmin closed 5 years ago

Jeerjmin commented 5 years ago

I would like to run the callback function after popup.close (). This is real?

tbleckert commented 5 years ago

You can register a listener to the close event with Popup.addCloseListener(() => {});. That callback will run on every close. But there's no way to add callbacks to the close call. The only way at the moment is to register a close listener before you call close and in the handler just remove the listener.