Prevent Modal from closing on submit.
On my view page i have action which is a modal (slideover) and after submit i do not want to close the modal. how to achieve this.
one way is to use extraModalFooterActions and disable the default action, but this is just a workaround and due to this the submit validation does not triggered.
i need the proper solution for this
3 Replies
You could try using the
halt()
method after you save your data:
I've used this before in the after()
lifecycle hook:
thanks @Adam i tried this and somewhat it works
but it created the other issue where the state of the modal content is not updating since it stopped the lifecycle , i can use something like
but it works wierdly, i have to sumit two time to make changes reflect.
What is it exactly that you want to happen?
You save the data and the modal remains open, and then you want the modal form to reset?