F
Filamentβ€’15mo ago
YoussefMaged

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
Patrick Boivin
Patrick Boivinβ€’15mo ago
Is this related to validation? Can you trigger a validation error?
YoussefMaged
YoussefMagedOPβ€’15mo ago
Throw a validation exception you mean?
Patrick Boivin
Patrick Boivinβ€’15mo ago
Yeah, something to experiment with... if the context is related to data validation.
YoussefMaged
YoussefMagedOPβ€’15mo ago
I tried throwing a validation exception but still the modal manages to close
Patrick Boivin
Patrick Boivinβ€’15mo ago
Can you share the modal code?
YoussefMaged
YoussefMagedOPβ€’15mo ago
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 πŸ™
Want results from more Discord servers?
Add your server