I have a custom widget that requires user input I would like to ensure that the user has input data before they close the panel.
I have some code that alerts the user if the data has not been input, but I would like the panel to re-open 'forcing' the user to set a value before proceeding.
I was using the onClose function to check for the value and then re-open the panel,
onClose: function(){
console.log('onClose');
if (!editor)
{
alert('Must set station/shift');
var pm = PanelManager.getInstance();
pm.openPanel(_34_panel);
}
}
I got an error in console that lead me to believe that the widget had been destroyed by the time it got to my code.