F
Filament7mo ago
Maru

Action not working in livewire component

my actions button shown but can't perform anything this is my code Inside of my class page
class DetailUserVerificationRequest extends Page implements HasInfolists, HasActions
{
use InteractsWithInfolists, InteractsWithActions;

[other code]

public function acceptAction(): Action
{
return Action::make('Konfirmasi')
->outlined()
->icon('heroicon-m-check')
->requiresConfirmation()
->action(fn () => $this->testCase());
}

public function testCase()
{
dd($this->request);
}
}
class DetailUserVerificationRequest extends Page implements HasInfolists, HasActions
{
use InteractsWithInfolists, InteractsWithActions;

[other code]

public function acceptAction(): Action
{
return Action::make('Konfirmasi')
->outlined()
->icon('heroicon-m-check')
->requiresConfirmation()
->action(fn () => $this->testCase());
}

public function testCase()
{
dd($this->request);
}
}
Inside the view
<x-filament-panels::page>
<div class="flex gap-3">
{{ $this->acceptAction }}
</div>

[other code]

<x-filament-actions::modals />
</x-filament-panels::page>
<x-filament-panels::page>
<div class="flex gap-3">
{{ $this->acceptAction }}
</div>

[other code]

<x-filament-actions::modals />
</x-filament-panels::page>
3 Replies
Solution
Dan Harrin
Dan Harrin7mo ago
No description
Dan Harrin
Dan Harrin7mo ago
you can pass a ->label() to change that on the button
Maru
MaruOP7mo ago
It's surprising that I didn't realize that myself. Thank you very much for pointing it out.
Want results from more Discord servers?
Add your server