F
Filament15mo ago
DivDax

Trigger action from javascript?

In my Livewire component, I have defined an action. Instead of displaying a button in my template, I would like to trigger the action using JavaScript. Is this possible?
6 Replies
LeandroFerreira
LeandroFerreira15mo ago
maybe dispatching the action in the mount method? What code did you try?
DivDax
DivDaxOP15mo ago
I use FullCalendar. When I move an event in the calendar, the eventDrop JavaScript method is called. I want to trigger a delete action via JavaScript before moving or deleting an event.
LeandroFerreira
LeandroFerreira15mo ago
Laravel
Actions | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
DivDax
DivDaxOP15mo ago
Don't mix livewire and filament actions. im talking about filament actions
slamx_
slamx_6mo ago
@DivDax did you find a solution?
DivDax
DivDaxOP6mo ago
1. dispatch event from javascript 2. listen for the event in the livewre component 3. call $this->mountAction('yourAction')
Want results from more Discord servers?
Add your server