Prevent Modal from closing on a specific event
I have an Observer Listener design pattern where on updating event for a Model I trigger a specific logic and I want this logic to halt/prevent the Resource's editing modal from closing if it fails, I tried throwing a new Halt exception but it still closes the modal, any ideas?
6 Replies
Is this related to validation? Can you trigger a validation error?
Throw a validation exception you mean?
Yeah, something to experiment with... if the context is related to data validation.
I tried throwing a validation exception but still the modal manages to close
Can you share the modal code?
Hello @pboivin , it's solved now actually my bad I was trying to halt a custom create action from the default
CreateAction
, but throwing a new Halt()
was enough to do the job from within the custom action, again thanks a lot for your time and patience π