Releases: wire-elements/modal
v1.0.1
v1.0.0
v1.0.0 stable release 🚀
Breaking changes to take into account:
The @livewireUIScripts
has been removed.
Any required Javascript will be loaded inline. If you want to include the Javascript in your bundler like Webpack you can use the config to disable Javascript and require the necessary Javascript require('vendor/livewire-ui/modal/resources/js/modal');
The package namespace has changed to livewire-ui-modal
If you published the modal view make sure to make the required changes.
0.1.7
0.1.6
- Add autofocus support
- Add option to change escape behaviour
- Add option to emit closed event
By default, closing a modal by pressing the escape key will force close all modals. If you want to disable this behavior to, for example, allow pressing escape to show a previous modal, you can overwrite the static closeModalOnEscapeIsForceful
method and have it return false
.
public static function closeModalOnEscapeIsForceful(): bool
{
return false;
}
When a modal is closed, you can optionally enable a modalClosed
event to be fired. This event will be fired on a call to closeModal
, when the escape button is pressed, or when you click outside the modal. The name of the closed component will be provided as a parameter;
public static function dispatchCloseEvent(): bool
{
return true;
}