What is the best way to abort/stop the detaching of a custom component because of certain condition. In my case, if the user has started to update a record in a custom component, I want to stop them at that point. I also want to stop the detaching/closing of any custom components below that one.