Closed lucasromanojf closed 4 years ago
What specifically do you want to be able to do or show instead of the modal? I could see the need for something like this, but I'd like to talk more about your specific needs.
What specifically do you want to be able to do or show instead of the modal? I could see the need for something like this, but I'd like to talk more about your specific needs.
Hey @calebporzio for example, I am showing, instead of the default HTML modal, a Tailwind UI alert. Other people may want to just show a default Javascript alert, I don't know. This can be easily achieved by overriding the showHtmlModal function as shown above, but maybe you will want do do this customization in another way (maybe something like window.livewire.on('error', (error) => {}) that overrides the showHtmlModal function) or, if not, just document the possibility of overriding showHtmlModal function. I can help with a PR for the decision whatever it will be, just wanted to discuss with you the better solution first.
This functionality has been addressed in this PR and will be available for the next tagged release: https://github.com/livewire/livewire/pull/1146
Is your feature request related to a problem? Please describe. Currently, when an exception happens in a Livewire request, a modal is displayed with the response HTML. There is no (documented) way of overriding/customizing this.
Describe the solution you'd like The goal of this ticket is to request a (official/documented) way of customizing the exception handling behavior in frontend.
Describe alternatives you've considered For now, we are overriding the showHtmlModal function, like this:
And in the Laravel's Handler.php class, inside the render method, we are doing something like this:
For now this works, but maybe there is a better and more elegant solution.
Additional context I am VERY involved with Livewire project and I want it to be great (more than it already is)! I am available for helping with anything you need.