Dialog onClose callback

This fix adds the possibility to call a callback everytime the Dialog widget is closed.