I have aura-if sections in my lightning component which shows a pop-up if user click on edit for any record which is working fine. In pop-up, I have a button on click of which it does some processing and wait for some integration results as well. Once I get the result in lightning component helper class I set aura-if variable to false so it closes the pop-up and also display a success toast message but somehow It doesn't get closed until and unless I click somewhere on the screen. All I do to close and show toast message is simply set those variables to false and call toast method to display toast message from helper method.
component.find("sSpinner").set("v.class" , 'slds-hide'); component.set('v.isConfirmShift', false); component.set('v.isShiftEdit', false); var toastmsg = 'Successfully Saved!'; helper.showToast(component,toastmsg , 'success' );
Any idea what can I do to close the pop-up as soon as I have the results without user needing to click somewhere?