Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 12:50 PM
I'm trying to run code after a Modal is closed on a widget. I am opening the modal in my widget and using .then. What I have noticed though is that the .then never runs if the user closes the Modal instead of pushing 'Ok'.
spModal.open({
widget:'widget-form',
widgetInput:{table:parms.table, sys_id:parms.sys_id},
size:'lg'
}).then(function(name){
myEl.removeClass('disabledbutton');
});
In my example the class is never removed in the case that the user pushes the X in the top right corner of the modal.
in a uib modal there is a .closed.then apparently, but this doesn't work with spModal
If this is not possible it would be good if I could just find a way to run this code once the Modal has loaded up, that is fine too.
Solved! Go to Solution.
Labels: