bastinald / laravel-livewire-modals

Dynamic Laravel Livewire Bootstrap modals.
66 stars 31 forks source link

Wire:loading on the trigger element #8

Open emildayan opened 2 years ago

emildayan commented 2 years ago

Some modals can be pretty heavy to load / setup, thus I like to display a loader on the button that triggers a modal.

I am guessing this won't be possible here, as wire:target has nothing to really target. Right?

bastinald commented 2 years ago

You'd have to add a method in your component that calls the emit. Then you can use wire:target on that method