Actions in renderHooks

Hello everyone,

I'm trying to return an array of actions in a view that I return through a renderHooks.

public function getViews()
{
  return[
    Action::make('table')
      ->action(function() {
          dd();
      }),
    Action::make('list')
      ->action(function() {
          dd();
      }),
  ];
}


@props([
  'views' => $this->getViews(),
])

@if ($multipleViews)
  <x-filament-tables::actions
    :actions="$views"
  />
@endif


My buttons display correctly but do not trigger the action() methods. Anyone know why?
Was this page helpful?