teodino93
teodino93
FFilament
Created by teodino93 on 8/25/2023 in #❓┊help
Dispatching an event from an Action
Hi, should i dispatch an event from an action like this?
Action::make('prova')
->action(function () {
$this->dispatch('prova', ['prova']);
})
Action::make('prova')
->action(function () {
$this->dispatch('prova', ['prova']);
})
->dispatch('prova', ['prova']) doesn't work
18 replies
FFilament
Created by teodino93 on 8/24/2023 in #❓┊help
Actions on custom Dashboard
Hi, I have a custom Dashboard page, with 4 Table Widgets, I need to add an Action button which dispatches an event. I've added the followind Action in the getHeaderActions function, but everytime i click on the button 3 of the 4 widgets goes away (only the latest on the array remains). The action takes place correctly, but I need my widgets not to hide. Someone had the same problem?
Action::make('prova')
->action(function () {
dump("prova");
})
Action::make('prova')
->action(function () {
dump("prova");
})
3 replies