F
Filament11mo ago
SirFat

Actions within livewire component - only one firing

I'm displaying information on the dashboard, which calls a live wire component for each record (works). Within that livewire component, I show two actions. One action shows the 'confirmation' the other does not. No errors being generated, caches cleared, filament:upgrade run. The livewire class: https://gist.github.com/martinedge/740c1c09eaa94b0734cac2a02eb1b7ea The blade content:
<div>
<div class="items-center gap-x-3 gap-y-3 p-0.5" >
{{ ($this->setSIMNumberAction)(['phrase' => 'yes']) }}
</div>
<div class="items-center gap-x-3 gap-y-3 p-0.5">
{{ ($this->proceedWithActivationAction)(['phrase' => 'what']) }}
</div>
<x-filament-actions::modals/>
</div>
<div>
<div class="items-center gap-x-3 gap-y-3 p-0.5" >
{{ ($this->setSIMNumberAction)(['phrase' => 'yes']) }}
</div>
<div class="items-center gap-x-3 gap-y-3 p-0.5">
{{ ($this->proceedWithActivationAction)(['phrase' => 'what']) }}
</div>
<x-filament-actions::modals/>
</div>
Set SIM works, but proceed-with-activation does not. The action button spins, but then stops spinning without error or action. I'm sure it's something silly - but I cannot pick it as I've removed anything complex out of the picture.
1 Reply
SirFat
SirFatOP11mo ago
Also related but not related, with the multiple actions, if I cancel one of the confirmation dialogs and hit another button straight away, most times it won't fire. I have to wait a few seconds (or click it twice) and the button then works, which is a little strange. There must be some other caching mechanism somewhere. I essentially recreated a new action, got it working, moved my more complex code from the action that wasn't working, and now it functions? My understanding is my clearing methods are; * npm run dev (or manually with npm run build * php artisan filament:upgrade * clear browser cache Still not sure about the delay between cancellation of a modal and it correctly being able to launch another modal
Want results from more Discord servers?
Add your server